Functions

mpcs.h File Reference

#include <dsplink.h>
#include <mpcsdefs.h>
Include dependency graph for gpp/inc/mpcs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

DLLEXPORT DSP_STATUS MPCS_create (IN ProcessorId procId, IN Pstr name, IN MPCS_ShObj *mpcsShObj, IN MPCS_Attrs *attrs)
 This function creates and initializes an instance of the MPCS object. The memory for the object may or may not be provided by the user. If provided by the user, the memory for the object must be shared across the processors using the MPCS. It must also already be mapped into user space for OSes supporting user/kernel separation.
DLLEXPORT DSP_STATUS MPCS_delete (IN ProcessorId procId, IN Pstr name)
 This function deletes the instance of the MPCS object.
DLLEXPORT DSP_STATUS MPCS_open (IN ProcessorId procId, IN Pstr name, OUT MPCS_Handle *mpcsHandle)
 This function opens an MPCS object specified by its name and gets a handle to the object. Every process that needs to use the MPCS object must get a handle to the object by calling this API.
DLLEXPORT DSP_STATUS MPCS_close (IN ProcessorId procId, IN MPCS_Handle mpcsHandle)
 This function closes an MPCS object specified by its handle.
DLLEXPORT DSP_STATUS MPCS_enter (IN MPCS_Handle mpcsHandle)
 This function enters the critical section specified by the MPCS object.
DLLEXPORT DSP_STATUS MPCS_leave (IN MPCS_Handle mpcsHandle)
 This function leaves the critical section specified by the MPCS object.

Function Documentation

DLLEXPORT DSP_STATUS MPCS_create ( IN ProcessorId  procId,
IN Pstr  name,
IN MPCS_ShObj mpcsShObj,
IN MPCS_Attrs attrs 
)

This function creates and initializes an instance of the MPCS object. The memory for the object may or may not be provided by the user. If provided by the user, the memory for the object must be shared across the processors using the MPCS. It must also already be mapped into user space for OSes supporting user/kernel separation.

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

Function:
MPCS_create
Parameters:
procIdID of the processor with which the MPCS object is to be shared.
nameSystem-wide unique name for the MPCS object.
mpcsShObjPointer to the shared MPCS object. If memory for the MPCS object is provided by the user, the MPCS object handle is not NULL. Otherwise, if the memory is to be allocated by the MPCS component, the MPCS object handle can be specified as NULL.
attrsAttributes for creation of the MPCS object.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Operation failed due to a memory error. DSP_EALREADYEXISTS The specified MPCS name already exists. DSP_ERESOURCE All MPCS entries are currently in use. DSP_EACCESSDENIED The MPCS component has not been initialized. DSP_EFAIL General failure.
Precondition:
procId must be valid. name must be valid. attrs must be valid.
Postcondition:
None
See also:
MPCS_delete () ============================================================================
DLLEXPORT DSP_STATUS MPCS_delete ( IN ProcessorId  procId,
IN Pstr  name 
)

This function deletes the instance of the MPCS object.

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

Function:
MPCS_delete
Parameters:
procIdID of the processor with which the MPCS is shared.
nameSystem-wide unique name for the MPCS object.
Returns:
DSP_SOK Operation successfully completed. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Operation failed due to a memory error. DSP_ENOTFOUND Specified MPCS object name does not exist. DSP_EACCESSDENIED The MPCS component has not been initialized. DSP_EFAIL General failure.
Precondition:
procId must be valid. name must be valid.
Postcondition:
None
See also:
MPCS_create () ============================================================================
DLLEXPORT DSP_STATUS MPCS_open ( IN ProcessorId  procId,
IN Pstr  name,
OUT MPCS_Handle mpcsHandle 
)

This function opens an MPCS object specified by its name and gets a handle to the object. Every process that needs to use the MPCS object must get a handle to the object by calling this API.

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

Function:
MPCS_open
Parameters:
procIdID of the processor with which the MPCS object is to be shared.
nameSystem-wide unique name for the MPCS object.
mpcsHandleLocation to receive the MPCS object handle, which is valid in the process space of the calling process.
Returns:
DSP_SOK Operation successfully completed. DSP_SEXISTS The MPCS connection already exists. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Operation failed due to a memory error. DSP_ENOTFOUND Specified MPCS object name does not exist. DSP_EACCESSDENIED The MPCS component has not been initialized. DSP_EFAIL General failure.
Precondition:
procId must be valid. name must be valid. mpcsHandle must be a valid pointer.
Postcondition:
None
See also:
MPCS_close () ============================================================================
DLLEXPORT DSP_STATUS MPCS_close ( IN ProcessorId  procId,
IN MPCS_Handle  mpcsHandle 
)

This function closes an MPCS object specified by its handle.

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

Function:
MPCS_close
Parameters:
procIdID of the processor with which the MPCS is shared.
mpcsHandleHandle to the MPCS object to be closed.
Returns:
DSP_SOK Operation successfully completed. DSP_SFREE The last close for specified MPCS resulted in it getting closed. DSP_EINVALIDARG Invalid argument. DSP_EMEMORY Operation failed due to a memory error. DSP_ENOTFOUND Specified MPCS object name does not exist. DSP_EACCESSDENIED The MPCS component has not been initialized. DSP_EFAIL General failure.
Precondition:
procId must be valid. mpcsHandle must be valid.
Postcondition:
None
See also:
MPCS_open () ============================================================================
DLLEXPORT DSP_STATUS MPCS_enter ( IN MPCS_Handle  mpcsHandle )

This function enters the critical section specified by the MPCS object.

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

Function:
MPCS_enter
Parameters:
mpcsHandleHandle to the MPCS object.
Returns:
DSP_SOK Operation successfully completed. DSP_EFAIL General failure.
Precondition:
mpcsHandle must be valid.
Postcondition:
None
See also:
MPCS_leave () ============================================================================
DLLEXPORT DSP_STATUS MPCS_leave ( IN MPCS_Handle  mpcsHandle )

This function leaves the critical section specified by the MPCS object.

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

Function:
MPCS_leave
Parameters:
mpcsHandleHandle to the MPCS object.
Returns:
DSP_SOK Operation successfully completed. DSP_EFAIL General failure.
Precondition:
mpcsHandle must be valid.
Postcondition:
None
See also:
MPCS_enter () ============================================================================
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated