const GateMP.Q_BLOCKING |
 |
Blocking quality
XDCscript usage |
meta-domain |
const GateMP.Q_BLOCKING = 1;
#define GateMP_Q_BLOCKING (Int)1
DETAILS
Gates with this "quality" may cause the calling thread to block;
i.e., suspend execution until another thread leaves the gate.
const GateMP.Q_PREEMPTING |
 |
Preempting quality
XDCscript usage |
meta-domain |
const GateMP.Q_PREEMPTING = 2;
#define GateMP_Q_PREEMPTING (Int)2
DETAILS
Gates with this "quality" allow other threads to preempt the thread
that has already entered the gate.
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;
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 -> GateHwi: 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
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;
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 |
 |
XDCscript usage |
meta-domain |
var obj = new GateMP.Reserved;
obj.version = Bits32 ...
typedef struct GateMP_Reserved {
Bits32 version;
} GateMP_Reserved;
config GateMP.A_invalidClose // module-wide |
 |
Assert raised when calling GateMP_close with the wrong handle
XDCscript usage |
meta-domain |
msg: "A_invalidContext: Calling GateMP_close with the wrong handle"
};
extern const Assert_Id GateMP_A_invalidClose;
config GateMP.A_invalidDelete // module-wide |
 |
Assert raised when calling GateMP_delete incorrectly
XDCscript usage |
meta-domain |
msg: "A_invalidDelete: Calling GateMP_delete incorrectly"
};
extern const Assert_Id GateMP_A_invalidDelete;
config GateMP.E_gateUnavailable // module-wide |
 |
Error raised no gates of the requested type are available
XDCscript usage |
meta-domain |
msg: "E_gateUnavailable: No gates of requested type are available"
};
extern const Error_Id GateMP_E_gateUnavailable;
config GateMP.E_localGate // module-wide |
 |
Error raised when remote side tried to open local gate
XDCscript usage |
meta-domain |
msg: "E_localGate: Only creator can open local Gate"
};
extern const Error_Id GateMP_E_localGate;
config GateMP.LM_close // module-wide |
 |
Logged on gate close
XDCscript usage |
meta-domain |
msg: "LM_close: Gate (remoteGate = %d, resourceId = %d) closed"
};
config GateMP.LM_create // module-wide |
 |
Logged on gate create
XDCscript usage |
meta-domain |
msg: "LM_create: Gate (remoteGate = %d, resourceId = %d) created"
};
config GateMP.LM_delete // module-wide |
 |
Logged on gate deletion
XDCscript usage |
meta-domain |
msg: "LM_delete: Gate (remoteGate = %d, resourceId = %d) deleted"
};
config GateMP.LM_enter // module-wide |
 |
Logged on gate enter
XDCscript usage |
meta-domain |
msg: "LM_enter: Gate (remoteGate = %d, resourceId = %d) entered, returning key = %d"
};
config GateMP.LM_leave // module-wide |
 |
Logged on gate leave
XDCscript usage |
meta-domain |
msg: "LM_leave: Gate (remoteGate = %d, resourceId = %d) left using key = %d"
};
config GateMP.LM_open // module-wide |
 |
Logged on gate open
XDCscript usage |
meta-domain |
msg: "LM_open: Remote gate (remoteGate = %d, resourceId = %d) opened"
};
config GateMP.maxNameLen // module-wide |
 |
Maximum length for names
XDCscript usage |
meta-domain |
GateMP.maxNameLen = UInt 32;
extern const UInt GateMP_maxNameLen;
metaonly config GateMP.common$ // module-wide |
 |
Common module configuration parameters
XDCscript usage |
meta-domain |
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 |
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;
GateMP.query( ) // module-wide |
 |
Runtime test for a particular gate quality
Bool GateMP_query( Int qual );
ARGUMENTS
qual
constant describing a quality
RETURNS
Returns TRUE if the gate has the given quality,
and FALSE otherwise, which includes the case when the gate does not
recognize the constant describing the quality.
metaonly GateMP.queryMeta( ) // module-wide |
 |
Configuration time test for a particular gate quality
XDCscript usage |
meta-domain |
GateMP.queryMeta( Int qual ) returns Bool
ARGUMENTS
qual
constant describing a quality
RETURNS
Returns TRUE if the gate has the given quality,
and FALSE otherwise, which includes the case when the gate does not
recognize the constant describing the quality.
module-wide built-ins |
 |
// Get this module's unique id
Bool GateMP_Module_startupDone( );
// Test if this module has completed startup
// 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
per-instance object types |
 |
typedef struct GateMP_Object GateMP_Object;
// Opaque internal representation of an instance object
// Client reference to an instance object
typedef struct GateMP_Struct GateMP_Struct;
// Opaque client structure large enough to hold an instance object
// Convert this instance structure pointer into an instance handle
// Convert this instance handle into an instance structure pointer
per-instance config parameters |
 |
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
// Instance config-params object
//
params.name = String null;
// Name of the instance
params.openFlag = Bool false;
//
params.regionId = UInt16 0;
// Shared Region Id
//
params.resourceId = Bits32 0;
//
params.sharedAddr = Ptr null;
// Physical address of the shared memory
typedef struct GateMP_Params {
// Instance config-params structure
// Common per-instance configs
//
String name;
// Name of the instance
Bool openFlag;
//
UInt16 regionId;
// Shared Region Id
//
Bits32 resourceId;
//
Ptr sharedAddr;
// Physical address of the shared memory
} GateMP_Params;
// Initialize this config-params structure with supplier-specified defaults before instance creation
config GateMP.localProtect // per-instance |
 |
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
config GateMP.name // per-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.
config GateMP.regionId // per-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.
config GateMP.remoteProtect // per-instance |
 |
XDCscript usage |
meta-domain |
var params = new GateMP.Params;
...
config GateMP.sharedAddr // per-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
per-instance creation |
 |
XDCscript usage |
meta-domain |
var params =
new GateMP.
Params;
// Allocate instance config-params
params.config = ...
// Assign individual configs
var inst = GateMP.create( params );
// Create an instance-object
// Allocate and initialize a new instance object and return its handle
// Initialize a new instance object inside the provided structure
ARGUMENTS
params
per-instance config params, or NULL to select default values (target-domain only)
eb
active error-handling block, or NULL to select default policy (target-domain only)
per-instance deletion |
 |
// Finalize and free this previously allocated instance object, setting the referenced handle to NULL
// Finalize the instance object inside the provided structure
GateMP.enter( ) // per-instance |
 |
Enter this gate
ARGUMENTS
handle
handle of a previously-created GateMP instance object
DETAILS
Each gate provider can implement mutual exclusion using different
algorithms; e.g., disabling all scheduling, disabling the scheduling
of all threads below a specified "priority level", suspending the
caller when the gate has been entered by another thread and
re-enabling it when the the other thread leaves the gate. However,
in all cases, after this method returns that caller has exclusive
access to the data protected by this gate.
A thread may reenter a gate without blocking or failing.
RETURNS
Returns a "key" that is used to
leave this gate; this
value is used to restore thread preemption to the state that
existed just prior to entering this gate.
GateMP.leave( ) // per-instance |
 |
Leave this gate
ARGUMENTS
handle
handle of a previously-created GateMP instance object
key
the value returned by a matching call to
enter
DETAILS
This method is only called by threads that have previously entered
this gate via
enter. After this method returns, the
caller must not access the data structure protected by this gate
(unless the caller has entered the gate more than once and other
calls to
leave remain to balance the number of previous
calls to
enter).
per-instance convertors |
 |
// unconditionally move one level up the inheritance hierarchy
// conditionally move one level down the inheritance hierarchy; NULL upon failure
per-instance built-ins |
 |
Int GateMP_Object_count( );
// The number of statically-created instance objects
// The handle of the i-th statically-created instance object (array == NULL)
// The handle of the first dynamically-created instance object, or NULL
// The handle of the next dynamically-created instance object, or NULL
// The heap used to allocate dynamically-created instance objects
// The label associated with this instance object
// The name of this instance object