Ipc.h File Reference


Detailed Description

Ipc Manager.

===========================================================================

This modules is primarily used to configure IPC-wide settings and initialize IPC at runtime. SharedRegion 0 must be valid before Ipc_start() can be called. Ipc_start() must be called before other IPC APIs are made.

============================================================================

Go to the source code of this file.

Defines

#define Ipc_S_BUSY   2
 The resource is still in use.
#define Ipc_S_ALREADYSETUP   1
 The module has been already setup.
#define Ipc_S_SUCCESS   0
 Operation is successful.
#define Ipc_E_FAIL   -1
 Generic failure.
#define Ipc_E_INVALIDARG   -2
 Argument passed to function is invalid.
#define Ipc_E_MEMORY   -3
 Operation resulted in memory failure.
#define Ipc_E_ALREADYEXISTS   -4
 The specified entity already exists.
#define Ipc_E_NOTFOUND   -5
 Unable to find the specified entity.
#define Ipc_E_TIMEOUT   -6
 Operation timed out.
#define Ipc_E_INVALIDSTATE   -7
 Module is not initialized.
#define Ipc_E_OSFAILURE   -8
 A failure occurred in an OS-specific call.
#define Ipc_E_RESOURCE   -9
 Specified resource is not available.
#define Ipc_E_RESTART   -10
 Operation was interrupted. Please restart the operation.

Functions

Int Ipc_attach (UInt16 remoteProcId)
 Attach to remote processor.
Int Ipc_detach (UInt16 remoteProcId)
 Detach from the remote processor.
Int Ipc_readConfig (UInt16 remoteProcId, UInt32 tag, Ptr cfg, SizeT size)
 Reads the config entry from the config area.
Int Ipc_start (Void)
 Reserves memory, creates default GateMP and HeapMemMP.
Int Ipc_writeConfig (UInt16 remoteProcId, UInt32 tag, Ptr cfg, SizeT size)
 Writes the config entry to the config area.

Define Documentation

#define Ipc_S_BUSY   2

The resource is still in use.

#define Ipc_S_ALREADYSETUP   1

The module has been already setup.

#define Ipc_S_SUCCESS   0

Operation is successful.

#define Ipc_E_FAIL   -1

Generic failure.

#define Ipc_E_INVALIDARG   -2

Argument passed to function is invalid.

#define Ipc_E_MEMORY   -3

Operation resulted in memory failure.

#define Ipc_E_ALREADYEXISTS   -4

The specified entity already exists.

#define Ipc_E_NOTFOUND   -5

Unable to find the specified entity.

#define Ipc_E_TIMEOUT   -6

Operation timed out.

#define Ipc_E_INVALIDSTATE   -7

Module is not initialized.

#define Ipc_E_OSFAILURE   -8

A failure occurred in an OS-specific call.

#define Ipc_E_RESOURCE   -9

Specified resource is not available.

#define Ipc_E_RESTART   -10

Operation was interrupted. Please restart the operation.


Function Documentation

Int Ipc_attach ( UInt16  remoteProcId  ) 

Attach to remote processor.

Sets the default GateMP if 'NULL'. Sets the SharedRegion 0 heap if 'NULL'. Creates the Notify, NameServerRemoteNotify, and MessageQ transport instances, in SharedRegion 0 heap, for communicating with the specified remote processor. Synchronizes self with the remote processor. Calls the user's attach function if configured. Ipc_start() must be called before calling Ipc_attach().

Parameters:
remoteProcId remote processor's MultiProc id
Returns:
Status
See also:
Ipc_detach
Int Ipc_detach ( UInt16  remoteProcId  ) 

Detach from the remote processor.

Deletes the Notify, NameServerRemoteNotify, and MessageQ transport instances, in SharedRegion 0 heap, for communicating with the specified remote processor.

Parameters:
remoteProcId remote processor's MultiProc id
Returns:
Status
See also:
Ipc_attach
Int Ipc_readConfig ( UInt16  remoteProcId,
UInt32  tag,
Ptr  cfg,
SizeT  size 
)

Reads the config entry from the config area.

Parameters:
remoteProcId remote processor's MultiProc id
tag tag to identify a config entry
cfg address where the entry will be copied
size size of config entry
Returns:
Status
Int Ipc_start ( Void   ) 

Reserves memory, creates default GateMP and HeapMemMP.

Function needs to be called before Ipc_attach(). Ipc reserves some shared memory in SharedRegion 0 for synchronization. GateMP reserves some shared memory for managing the gates and for the default GateMP. The same amount of memory must be reserved by each processor, but only the owner of SharedRegion 0 clears the reserved memory and creates the default GateMP. The default heap for each SharedRegion is created by the owner of each SharedRegion.

Returns:
Status
Int Ipc_writeConfig ( UInt16  remoteProcId,
UInt32  tag,
Ptr  cfg,
SizeT  size 
)

Writes the config entry to the config area.

Parameters:
remoteProcId remote processor's MultiProc id
tag tag to identify a config entry
cfg address where the entry will be copied
size size of config entry
Returns:
Status

Copyright 2010, Texas Instruments Incorporated