Defines | Functions

MultiProc.h File Reference


Detailed Description

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>
This graph shows which files directly or indirectly include this file:

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 Documentation

#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.


Function Documentation

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.

Parameters:
nameName of the processor.
Returns:
MultiProc id
See also:
MultiProc_getName
String MultiProc_getName ( UInt16  id )

Gets the name of a processor.

Parameters:
idMultiProc id.
Returns:
Name of the processor

The returned string should never be modified.

See also:
MultiProc_getId
UInt16 MultiProc_getNumProcessors ( Void   )

Gets the number of processors.

Returns:
Number of processors configured with MultiProc
UInt16 MultiProc_self ( Void   )

Gets executing processor's MultiProc id.

Returns:
Executing processor's id
See also:
MultiProc_getId
Int MultiProc_setLocalId ( UInt16  id )

Sets executing processor's MultiProc id.

Parameters:
idMultiProc id
Returns:
MultiProc status:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated