IPC API
3.30.01.12
|
Processor ID Manager.
Many IPC modules require the ability to uniquely specify and identify processors in a multi-processor environment. The MultiProc module centralizes processor id management.
Each processor in the MultiProc module may be uniquely identified by either a name string or an integer ranging from 0 to NUMPROCESSORS - 1.
At runtime, the MultiProc_getId() call returns the MultiProc id for any processor given its name.
The MultiProc header should be included in an application as follows:
It is critical that every core contains a consistent MultiProc configuration. Failure to do so will lead to unknown behavior, including failures to attach, messages being sent to the wrong cores, etc.
With few exceptions (e.g. MultiProc_setLocalId()), the MultiProc configuration is done outside of the runtime APIs, and the actual setup is unique to each OS:
Go to the source code of this file.
Macros | |
#define | MultiProc_S_BUSY (2) |
The resource is still in use. More... | |
#define | MultiProc_S_ALREADYSETUP (1) |
The module has been already setup. More... | |
#define | MultiProc_S_SUCCESS (0) |
Operation is successful. More... | |
#define | MultiProc_E_FAIL (-1) |
Generic failure. More... | |
#define | MultiProc_E_INVALIDARG (-2) |
Argument passed to function is invalid. More... | |
#define | MultiProc_E_MEMORY (-3) |
Operation resulted in memory failure. More... | |
#define | MultiProc_E_ALREADYEXISTS (-4) |
The specified entity already exists. More... | |
#define | MultiProc_E_NOTFOUND (-5) |
Unable to find the specified entity. More... | |
#define | MultiProc_E_TIMEOUT (-6) |
Operation timed out. More... | |
#define | MultiProc_E_INVALIDSTATE (-7) |
Module is not initialized. More... | |
#define | MultiProc_E_OSFAILURE (-8) |
A failure occurred in an OS-specific call. More... | |
#define | MultiProc_E_RESOURCE (-9) |
Specified resource is not available. More... | |
#define | MultiProc_E_RESTART (-10) |
Operation was interrupted. Please restart the operation. More... | |
#define | MultiProc_INVALIDID (0xFFFF) |
Invalid processor id. More... | |
Functions | |
UInt16 | MultiProc_getBaseIdOfCluster (Void) |
Gets the base MultiProc id of the cluster. More... | |
UInt16 | MultiProc_getId (String name) |
Gets the MultiProc id. More... | |
String | MultiProc_getName (UInt16 id) |
Gets the name of a processor. More... | |
UInt16 | MultiProc_getNumProcessors (Void) |
Gets the number of processors. More... | |
UInt16 | MultiProc_getNumProcsInCluster (Void) |
Gets the number of processors in the cluster. More... | |
UInt16 | MultiProc_self (Void) |
Gets executing processor's MultiProc id. More... | |
Int | MultiProc_setLocalId (UInt16 id) |
Sets executing processor's MultiProc id. More... | |
#define MultiProc_S_BUSY (2) |
The resource is still in use.
#define MultiProc_S_ALREADYSETUP (1) |
The module has been already setup.
#define MultiProc_S_SUCCESS (0) |
Operation is successful.
#define MultiProc_E_FAIL (-1) |
Generic failure.
#define MultiProc_E_INVALIDARG (-2) |
Argument passed to function is invalid.
#define MultiProc_E_MEMORY (-3) |
Operation resulted in memory failure.
#define MultiProc_E_ALREADYEXISTS (-4) |
The specified entity already exists.
#define MultiProc_E_NOTFOUND (-5) |
Unable to find the specified entity.
#define MultiProc_E_TIMEOUT (-6) |
Operation timed out.
#define MultiProc_E_INVALIDSTATE (-7) |
Module is not initialized.
#define MultiProc_E_OSFAILURE (-8) |
A failure occurred in an OS-specific call.
#define MultiProc_E_RESOURCE (-9) |
Specified resource is not available.
#define MultiProc_E_RESTART (-10) |
Operation was interrupted. Please restart the operation.
#define MultiProc_INVALIDID (0xFFFF) |
Invalid processor id.
UInt16 MultiProc_getBaseIdOfCluster | ( | Void | ) |
Gets the base MultiProc id of the cluster.
Retrieves the base MultiProc id for the cluster of processors.
UInt16 MultiProc_getId | ( | String | name | ) |
Gets the MultiProc id.
Retrieves the MultiProc id for the processor with corresponding MultiProc name. MultiProc_INVALIDID is returned if the name was not found.
name | Name of the processor. |
String MultiProc_getName | ( | UInt16 | id | ) |
Gets the name of a processor.
id | MultiProc id. |
The returned string should never be modified.
UInt16 MultiProc_getNumProcessors | ( | Void | ) |
Gets the number of processors.
UInt16 MultiProc_getNumProcsInCluster | ( | Void | ) |
Gets the number of processors in the cluster.
UInt16 MultiProc_self | ( | Void | ) |
Int MultiProc_setLocalId | ( | UInt16 | id | ) |
Sets executing processor's MultiProc id.
id | MultiProc id |