module ti.sdo.ipc.GateMP

Multiple processor gate that provides local and remote context protection

This module has a common header that can be found in the ti.ipc package. Application code should include the common header file (not the RTSC-generated one):
#include <ti/ipc/GateMP.h>
The RTSC module must be used in the application's RTSC configuration file (.cfg) if runtime APIs will be used in the application:
GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
Documentation for all runtime APIs, instance configuration parameters, error codes macros and type definitions available to the application integrator can be found in the Doxygen documenation for the IPC product. However, the documentation presented on this page should be referred to for information specific to the RTSC module, such as module configuration, Errors, and Asserts.
C synopsis target-domain sourced in ti/sdo/ipc/GateMP.xdc
#include <ti/sdo/ipc/GateMP.h>
Functions
Void
Functions common to all target instances
Functions common to all target modules
Typedefs
typedef GateMP_Object *
typedef enum
typedef struct
typedef struct
typedef enum
typedef struct
typedef struct
Constants
extern const Assert_Id 
extern const Assert_Id 
extern const Error_Id 
extern const Error_Id 
extern const Log_Event 
extern const Log_Event 
extern const Log_Event 
extern const Log_Event 
extern const Log_Event 
extern const Log_Event 
extern const UInt 
 
 
enum GateMP_LocalProtect

A set of local context protection levels

C synopsis target-domain
typedef enum GateMP_LocalProtect {
    GateMP_LocalProtect_NONE,
    GateMP_LocalProtect_INTERRUPT,
    GateMP_LocalProtect_TASKLET,
    GateMP_LocalProtect_THREAD,
    GateMP_LocalProtect_PROCESS
} GateMP_LocalProtect;
 
DETAILS
Each member corresponds to a specific local processor gates used for local protection.
For SYS/BIOS users, the following are the mappings for the constants
  • INTERRUPT -> GateAll: disables interrupts
  • TASKLET -> GateSwi: disables Swis (software interrupts)
  • THREAD -> GateMutexPri: based on Semaphores
  • PROCESS -> GateMutexPri: based on Semaphores
 
enum GateMP_RemoteProtect

Type of remote Gate

C synopsis target-domain
typedef enum GateMP_RemoteProtect {
    GateMP_RemoteProtect_NONE,
    GateMP_RemoteProtect_SYSTEM,
    GateMP_RemoteProtect_CUSTOM1,
    GateMP_RemoteProtect_CUSTOM2
} GateMP_RemoteProtect;
 
DETAILS
Each member corresponds to a specific type of remote gate. Each enum value corresponds to the following remote protection levels:
  • NONE -> No remote protection (the GateMP instance will exclusively offer local protection configured in localProtect)
  • SYSTEM -> Use the SYSTEM remote protection level (default for remote protection
  • CUSTOM1 -> Use the CUSTOM1 remote protection level
  • CUSTOM2 -> Use the CUSTOM2 remote protection level
 
struct GateMP_Reserved
C synopsis target-domain
typedef struct GateMP_Reserved {
    Bits32 version;
} GateMP_Reserved;
 
 
config GateMP_A_invalidClose  // module-wide

Assert raised when calling GateMP_close with the wrong handle

C synopsis target-domain
extern const Assert_Id GateMP_A_invalidClose;
 
 
config GateMP_A_invalidDelete  // module-wide

Assert raised when calling GateMP_delete incorrectly

C synopsis target-domain
extern const Assert_Id GateMP_A_invalidDelete;
 
 
config GateMP_E_gateUnavailable  // module-wide

Error raised no gates of the requested type are available

C synopsis target-domain
extern const Error_Id GateMP_E_gateUnavailable;
 
 
config GateMP_E_localGate  // module-wide

Error raised when remote side tried to open local gate

C synopsis target-domain
extern const Error_Id GateMP_E_localGate;
 
 
config GateMP_LM_close  // module-wide

Logged on gate close

C synopsis target-domain
extern const Log_Event GateMP_LM_close;
 
 
config GateMP_LM_create  // module-wide

Logged on gate create

C synopsis target-domain
extern const Log_Event GateMP_LM_create;
 
 
config GateMP_LM_delete  // module-wide

Logged on gate deletion

C synopsis target-domain
extern const Log_Event GateMP_LM_delete;
 
 
config GateMP_LM_enter  // module-wide

Logged on gate enter

C synopsis target-domain
extern const Log_Event GateMP_LM_enter;
 
 
config GateMP_LM_leave  // module-wide

Logged on gate leave

C synopsis target-domain
extern const Log_Event GateMP_LM_leave;
 
 
config GateMP_LM_open  // module-wide

Logged on gate open

C synopsis target-domain
extern const Log_Event GateMP_LM_open;
 
 
config GateMP_maxNameLen  // module-wide

Maximum length for names

C synopsis target-domain
extern const UInt GateMP_maxNameLen;
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId GateMP_Module_id();
// Get this module's unique id
 
Bool GateMP_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle GateMP_Module_heap();
// The heap from which this module allocates memory
 
Bool GateMP_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 GateMP_Module_getMask();
// Returns the diagnostics mask for this module
 
Void GateMP_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
Instance Object Types

C synopsis target-domain
typedef struct GateMP_Object GateMP_Object;
// Opaque internal representation of an instance object
 
typedef GateMP_Object *GateMP_Handle;
// Client reference to an instance object
 
typedef struct GateMP_Struct GateMP_Struct;
// Opaque client structure large enough to hold an instance object
 
GateMP_Handle GateMP_handle(GateMP_Struct *structP);
// Convert this instance structure pointer into an instance handle
 
GateMP_Struct *GateMP_struct(GateMP_Handle handle);
// Convert this instance handle into an instance structure pointer
Instance Config Parameters

C synopsis target-domain
typedef struct GateMP_Params {
// Instance config-params structure
    IInstance_Params *instance;
    // Common per-instance configs
    GateMP_LocalProtect localProtect;
    // 
    String name;
    // Name of the instance
    UInt16 regionId;
    // Shared Region Id
    GateMP_RemoteProtect remoteProtect;
    // 
    Ptr sharedAddr;
    // Physical address of the shared memory
} GateMP_Params;
 
Void GateMP_Params_init(GateMP_Params *params);
// Initialize this config-params structure with supplier-specified defaults before instance creation
 
config GateMP_localProtect  // instance
C synopsis target-domain
struct GateMP_Params {
      ...
    GateMP_LocalProtect localProtect;
 
 
config GateMP_name  // instance

Name of the instance

C synopsis target-domain
struct GateMP_Params {
      ...
    String name;
 
DETAILS
Name needs to be unique. Used only if useNameServer is set to TRUE.
 
config GateMP_regionId  // instance

Shared Region Id

C synopsis target-domain
struct GateMP_Params {
      ...
    UInt16 regionId;
 
DETAILS
The ID corresponding to the shared region in which this shared instance is to be placed.
 
config GateMP_remoteProtect  // instance
C synopsis target-domain
struct GateMP_Params {
      ...
    GateMP_RemoteProtect remoteProtect;
 
 
config GateMP_sharedAddr  // instance

Physical address of the shared memory

C synopsis target-domain
struct GateMP_Params {
      ...
    Ptr sharedAddr;
 
DETAILS
The creator must supply the shared memory that will be used for maintaining shared state information. This parameter is used only when Type is set to Type_SHARED
Instance Built-Ins

C synopsis target-domain
Int GateMP_Object_count();
// The number of statically-created instance objects
 
GateMP_Handle GateMP_Object_get(GateMP_Object *array, Int i);
// The handle of the i-th statically-created instance object (array == NULL)
 
GateMP_Handle GateMP_Object_first();
// The handle of the first dynamically-created instance object, or NULL
 
GateMP_Handle GateMP_Object_next(GateMP_Handle handle);
// The handle of the next dynamically-created instance object, or NULL
 
IHeap_Handle GateMP_Object_heap();
// The heap used to allocate dynamically-created instance objects
 
Types_Label *GateMP_Handle_label(GateMP_Handle handle, Types_Label *buf);
// The label associated with this instance object
 
String GateMP_Handle_name(GateMP_Handle handle);
// The name of this instance object
 
XDCscript usage meta-domain sourced in ti/sdo/ipc/GateMP.xdc
var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
local proxy modules
        GateMP.RemoteCustom1Proxy.delegate$ = IGateMPSupport.Module null
        GateMP.RemoteCustom1Proxy.abstractInstances$ = false
 
        GateMP.RemoteCustom2Proxy.delegate$ = IGateMPSupport.Module null
        GateMP.RemoteCustom2Proxy.abstractInstances$ = false
 
        GateMP.RemoteSystemProxy.delegate$ = IGateMPSupport.Module null
        GateMP.RemoteSystemProxy.abstractInstances$ = false
module-wide constants & types
        const GateMP.LocalProtect_NONE;
        const GateMP.LocalProtect_INTERRUPT;
        const GateMP.LocalProtect_TASKLET;
        const GateMP.LocalProtect_THREAD;
        const GateMP.LocalProtect_PROCESS;
 
        const GateMP.RemoteProtect_NONE;
        const GateMP.RemoteProtect_SYSTEM;
        const GateMP.RemoteProtect_CUSTOM1;
        const GateMP.RemoteProtect_CUSTOM2;
 
    var obj = new GateMP.Reserved// ;
        obj.version = Bits32  ...
module-wide config parameters
        msg: "A_invalidContext: Calling GateMP_close with the wrong handle"
    };
        msg: "A_invalidDelete: Calling GateMP_delete incorrectly"
    };
        msg: "E_gateUnavailable: No gates of requested type are available"
    };
        msg: "E_localGate: Only creator can open local Gate"
    };
        mask: Diags.USER1,
        msg: "LM_close: Gate (remoteGate = %d, resourceId = %d) closed"
    };
        mask: Diags.USER1,
        msg: "LM_create: Gate (remoteGate = %d, resourceId = %d) created"
    };
        mask: Diags.USER1,
        msg: "LM_delete: Gate (remoteGate = %d, resourceId = %d) deleted"
    };
        mask: Diags.USER1,
        msg: "LM_enter: Gate (remoteGate = %d, resourceId = %d) entered, returning key = %d"
    };
        mask: Diags.USER1,
        msg: "LM_leave: Gate (remoteGate = %d, resourceId = %d) left using key = %d"
    };
        mask: Diags.USER1,
        msg: "LM_open: Remote gate (remoteGate = %d, resourceId = %d) opened"
    };
 
per-instance config parameters
    var params = new GateMP.Params// Instance config-params object;
        params.name// Name of the instance = String null;
        params.regionId// Shared Region Id = UInt16 0;
        params.sharedAddr// Physical address of the shared memory = Ptr null;
 
 
proxy GateMP.RemoteCustom1Proxy

Custom1 remote gate proxy

XDCscript usage meta-domain
GateMP.RemoteCustom1Proxy = IGateMPSupport.Module null
// some delegate module inheriting the IGateMPSupport interface
    GateMP.RemoteCustom1Proxy.delegate$ = IGateMPSupport.Module null
    // explicit access to the currently bound delegate module
    GateMP.RemoteCustom1Proxy.abstractInstances$ = false
    // use indirect runtime function calls if true
 
DETAILS
GateMP instances may use the 'Custom1' proxy for locking between multiple processors. This proxy defaults to ti.sdo.ipc.gates.GatePeterson.
 
proxy GateMP.RemoteCustom2Proxy

Custom2 remote gate proxy

XDCscript usage meta-domain
GateMP.RemoteCustom2Proxy = IGateMPSupport.Module null
// some delegate module inheriting the IGateMPSupport interface
    GateMP.RemoteCustom2Proxy.delegate$ = IGateMPSupport.Module null
    // explicit access to the currently bound delegate module
    GateMP.RemoteCustom2Proxy.abstractInstances$ = false
    // use indirect runtime function calls if true
 
DETAILS
GateMP instances may use the 'Custom2' proxy for locking between multiple processors. This proxy defaults to ti.sdo.ipc.gates.GateMPSupportNull.
 
proxy GateMP.RemoteSystemProxy

System remote gate proxy

XDCscript usage meta-domain
GateMP.RemoteSystemProxy = IGateMPSupport.Module null
// some delegate module inheriting the IGateMPSupport interface
    GateMP.RemoteSystemProxy.delegate$ = IGateMPSupport.Module null
    // explicit access to the currently bound delegate module
    GateMP.RemoteSystemProxy.abstractInstances$ = false
    // use indirect runtime function calls if true
 
DETAILS
By default, GateMP instances use the 'System' proxy for locking between multiple processors by setting the 'localProtect' setting to . This remote gate proxy defaults to a device-specific remote GateMP delegate and typically should not be modified.
 
enum GateMP.LocalProtect

A set of local context protection levels

XDCscript usage meta-domain
values of type GateMP.LocalProtect
    const GateMP.LocalProtect_NONE;
    const GateMP.LocalProtect_INTERRUPT;
    const GateMP.LocalProtect_TASKLET;
    const GateMP.LocalProtect_THREAD;
    const GateMP.LocalProtect_PROCESS;
 
DETAILS
Each member corresponds to a specific local processor gates used for local protection.
For SYS/BIOS users, the following are the mappings for the constants
  • INTERRUPT -> GateAll: disables interrupts
  • TASKLET -> GateSwi: disables Swis (software interrupts)
  • THREAD -> GateMutexPri: based on Semaphores
  • PROCESS -> GateMutexPri: based on Semaphores
C SYNOPSIS
 
enum GateMP.RemoteProtect

Type of remote Gate

XDCscript usage meta-domain
values of type GateMP.RemoteProtect
    const GateMP.RemoteProtect_NONE;
    const GateMP.RemoteProtect_SYSTEM;
    const GateMP.RemoteProtect_CUSTOM1;
    const GateMP.RemoteProtect_CUSTOM2;
 
DETAILS
Each member corresponds to a specific type of remote gate. Each enum value corresponds to the following remote protection levels:
  • NONE -> No remote protection (the GateMP instance will exclusively offer local protection configured in localProtect)
  • SYSTEM -> Use the SYSTEM remote protection level (default for remote protection
  • CUSTOM1 -> Use the CUSTOM1 remote protection level
  • CUSTOM2 -> Use the CUSTOM2 remote protection level
C SYNOPSIS
 
struct GateMP.Reserved
XDCscript usage meta-domain
var obj = new GateMP.Reserved;
 
    obj.version = Bits32  ...
 
C SYNOPSIS
 
config GateMP.A_invalidClose  // module-wide

Assert raised when calling GateMP_close with the wrong handle

XDCscript usage meta-domain
GateMP.A_invalidClose = Assert.Desc {
    msg: "A_invalidContext: Calling GateMP_close with the wrong handle"
};
 
C SYNOPSIS
 
config GateMP.A_invalidDelete  // module-wide

Assert raised when calling GateMP_delete incorrectly

XDCscript usage meta-domain
GateMP.A_invalidDelete = Assert.Desc {
    msg: "A_invalidDelete: Calling GateMP_delete incorrectly"
};
 
C SYNOPSIS
 
config GateMP.E_gateUnavailable  // module-wide

Error raised no gates of the requested type are available

XDCscript usage meta-domain
GateMP.E_gateUnavailable = Error.Desc {
    msg: "E_gateUnavailable: No gates of requested type are available"
};
 
C SYNOPSIS
 
config GateMP.E_localGate  // module-wide

Error raised when remote side tried to open local gate

XDCscript usage meta-domain
GateMP.E_localGate = Error.Desc {
    msg: "E_localGate: Only creator can open local Gate"
};
 
C SYNOPSIS
 
config GateMP.LM_close  // module-wide

Logged on gate close

XDCscript usage meta-domain
GateMP.LM_close = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_close: Gate (remoteGate = %d, resourceId = %d) closed"
};
 
C SYNOPSIS
 
config GateMP.LM_create  // module-wide

Logged on gate create

XDCscript usage meta-domain
GateMP.LM_create = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_create: Gate (remoteGate = %d, resourceId = %d) created"
};
 
C SYNOPSIS
 
config GateMP.LM_delete  // module-wide

Logged on gate deletion

XDCscript usage meta-domain
GateMP.LM_delete = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_delete: Gate (remoteGate = %d, resourceId = %d) deleted"
};
 
C SYNOPSIS
 
config GateMP.LM_enter  // module-wide

Logged on gate enter

XDCscript usage meta-domain
GateMP.LM_enter = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_enter: Gate (remoteGate = %d, resourceId = %d) entered, returning key = %d"
};
 
C SYNOPSIS
 
config GateMP.LM_leave  // module-wide

Logged on gate leave

XDCscript usage meta-domain
GateMP.LM_leave = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_leave: Gate (remoteGate = %d, resourceId = %d) left using key = %d"
};
 
C SYNOPSIS
 
config GateMP.LM_open  // module-wide

Logged on gate open

XDCscript usage meta-domain
GateMP.LM_open = Log.EventDesc {
    mask: Diags.USER1,
    msg: "LM_open: Remote gate (remoteGate = %d, resourceId = %d) opened"
};
 
C SYNOPSIS
 
config GateMP.maxNameLen  // module-wide

Maximum length for names

XDCscript usage meta-domain
GateMP.maxNameLen = UInt 32;
 
C SYNOPSIS
 
metaonly config GateMP.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
GateMP.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
 
metaonly config GateMP.maxRuntimeEntries  // module-wide

Maximum runtime entries

XDCscript usage meta-domain
GateMP.maxRuntimeEntries = UInt NameServer.ALLOWGROWTH;
 
DETAILS
Maximum number of GateMP's that can be dynamically created and added to the NameServer.
To minimize the amount of runtime allocation, this parameter allows the pre-allocation of memory for the GateMP's NameServer table. The default is to allow growth (i.e. memory allocation when creating a new instance).
 
metaonly config GateMP.tableSection  // module-wide

Section name is used to place the names table

XDCscript usage meta-domain
GateMP.tableSection = String null;
 
Instance Config Parameters

XDCscript usage meta-domain
var params = new GateMP.Params;
// Instance config-params object
    params.localProtect = GateMP.LocalProtect GateMP.LocalProtect_THREAD;
    // 
    params.name = String null;
    // Name of the instance
    params.regionId = UInt16 0;
    // Shared Region Id
    params.remoteProtect = GateMP.RemoteProtect GateMP.RemoteProtect_SYSTEM;
    // 
    params.sharedAddr = Ptr null;
    // Physical address of the shared memory
 
config GateMP.localProtect  // instance
XDCscript usage meta-domain
var params = new GateMP.Params;
  ...
 
C SYNOPSIS
 
config GateMP.name  // instance

Name of the instance

XDCscript usage meta-domain
var params = new GateMP.Params;
  ...
params.name = String null;
 
DETAILS
Name needs to be unique. Used only if useNameServer is set to TRUE.
C SYNOPSIS
 
config GateMP.regionId  // instance

Shared Region Id

XDCscript usage meta-domain
var params = new GateMP.Params;
  ...
params.regionId = UInt16 0;
 
DETAILS
The ID corresponding to the shared region in which this shared instance is to be placed.
C SYNOPSIS
 
config GateMP.remoteProtect  // instance
XDCscript usage meta-domain
var params = new GateMP.Params;
  ...
 
C SYNOPSIS
 
config GateMP.sharedAddr  // instance

Physical address of the shared memory

XDCscript usage meta-domain
var params = new GateMP.Params;
  ...
params.sharedAddr = Ptr null;
 
DETAILS
The creator must supply the shared memory that will be used for maintaining shared state information. This parameter is used only when Type is set to Type_SHARED
C SYNOPSIS
generated on Sat, 11 Feb 2012 00:38:09 GMT