IPC API  3.40.00.06
Macros | 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 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:

Configuration

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:

This graph shows which files directly or indirectly include this file:

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_getClusterProcList (Void)
 Return the list of processors in 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...
 
Int MultiProc_setBaseIdOfCluster (UInt16 id)
 Sets executing processor's MultiProc cluster base id. More...
 
Int MultiProc_rprocSetId (UInt16 procId, UInt rprocId)
 

Macro Definition 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_getBaseIdOfCluster ( Void  )

Gets the base MultiProc id of the cluster.

Retrieves the base MultiProc id for the cluster of processors.

Returns
MultiProc id for base of cluster
See also
MultiProc_getClusterId
UInt16* MultiProc_getClusterProcList ( Void  )

Return the list of processors in the cluster.

Returns a list which contains the procIds of every processor in the cluster. This is useful for functions which require a list of procIds.

Returns
List of processors Ids
See also
MultiProc_getNumProcsInCluster
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_getNumProcsInCluster ( Void  )

Gets the number of processors in the cluster.

Returns
Number of processors in cluster
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
Remarks
Many users don't require this function. A typical use case for this function is on a homogenous multicore device where the exact same image is loaded onto all cores and the 'current' processor id is determined/set at runtime by reading a GPIO pin or interesting register like C6000's DNUM.
To succeed, the currently configured id must be MultiProc_INVALIDID.
Returns
MultiProc status:
Int MultiProc_setBaseIdOfCluster ( UInt16  id)

Sets executing processor's MultiProc cluster base id.

Parameters
idCluster base id
Remarks
Many users don't require this function. A typical use case for this function is on a homogenous multicore device where the exact same image is loaded onto all cores and the 'current' processor's cluster base id is determined/set at runtime by reading a GPIO pin or manually assigned via a special mechanism.
Currently only supported in SYSBIOS.
Returns
MultiProc status:
Int MultiProc_rprocSetId ( UInt16  procId,
UInt  rprocId 
)
Copyright 2015, Texas Instruments Incorporated