NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <ipc/chId.h>int uiBuild(KnUniqueId * ui, unsigned int type, unsigned int site, unsigned int hea, unsigned int tail);
IPC
The uiBuild system call builds a unique identifier from user-provided values. The built UI value is returned in the KnUniqueId structure pointed to by ui.
The type field defines the type of the UI as follows:
The UI will be usable as a port UI for the IPC module. The UI can then be usedin a call to portDeclare(2K)).
The UI will be usable as a group UI for the IPC module. The UI can then be used in a call to grpPortInsert(2K)).
The UI will be a site UI.
The UI will be usable as a message queue UI for the MIPC_G module. The UI can then be used in a call to msgQueueBind(2K)).
The site field is a site number. If a non-zero value is given, this field will be interpreted by the kernel as a location hint for the UI.
The head and tail fields represent the stamp of the UI. tail is a 32 bits value. head is is a 13 bits value.
The uiIsLocal function checks whether the UI given by ui is recognized by the local site, and returns 1 if the UI is recognized, 0 otherwise.
On every site, the kernel declares a pre-defined site UI by default. The uiSite function returns the value of this pre-defined UI for the site whose site number is site (see uiLocalSite (2K)). Note that uiSite (ui, site) is equivalent to uiBuild (ui, K_UISITE, site, 0, 0).
The uiClear function initializes ui with a standard null value.
The uiEqual function returns 1 if the two UI's passed as arguments are equal, 0 otherwise.
The uiGetSite function returns the site information contained within ui.
The uiValid function returns 0 if ui is equal to the null UI, 1 otherwise.
The uiIsLocal function returns 1 if the UI checked is local, 0 otherwise. The uiValid function returns 1 if the checked UI is different from the null value, 0 otherwise. The uiEqual function returns 1 if the UI's are identical, 0 otherwise. Other calls return 0 upon successful completion, a negative error code otherwise.
The uiClear, uiValid, uiEqual and uiGetSite never return K_EFAULT. If they are invoked with an invalid UI pointer, an exception occurs within the caller's context.
Some of the provided data are outside the current actor's address space ( uiBuild and uiLocalSite ).
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO