Processor ID Manager.
===========================================================================
Many IPC modules require the ability to uniquely specify and identify processors in a multi-processor environment. The MultiProc module centeralizes processor id management into one module. Since this configuration is almost always universally required, most IPC applications require supplying configuration of this module.
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:
#include <ti/ipc/MultiProc.h>
Go to the source code of this file.
Defines | |
#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. | |
Functions | |
UInt16 | MultiProc_getId (String name) |
Gets the MultiProc id. | |
String | MultiProc_getName (UInt16 id) |
Gets the name of a processor. | |
UInt16 | MultiProc_getNumProcessors (Void) |
Gets the number of processors. | |
UInt16 | MultiProc_self (Void) |
Gets executing processor's MultiProc id. | |
Int | MultiProc_setLocalId (UInt16 id) |
Sets executing processor's MultiProc id. |
#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_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_self | ( | Void | ) |
Int MultiProc_setLocalId | ( | UInt16 | id ) |
Sets executing processor's MultiProc id.
id | MultiProc id |