module xdc.runtime.knl.GateH

Provides APIs to protect critical sections when an IGate.Handle is available

An application can isolate itself from IGate implementations by using this module. The application must first obtain an IGate.Handle. It can get such a handle by directly calling GateThread.create or GateProcess.create. Then the application can use the generic APIs provided by this module. [ more ... ]
C synopsis target-domain sourced in xdc/runtime/knl/GateH.xdc
DETAILS
An application can isolate itself from IGate implementations by using this module. The application must first obtain an IGate.Handle. It can get such a handle by directly calling GateThread.create or GateProcess.create. Then the application can use the generic APIs provided by this module.
The underlying gates are nexting in nature and users have to leave the gate as many times as they entered it.
 
GateH_enter()  // module-wide

Enter a gate

C synopsis target-domain
IArg GateH_enter(IGateProvider_Handle hdl);
 
ARGUMENTS
hdl — IGateProvider.Handle
RETURNS
key
 
GateH_leave()  // module-wide

Leave a gate

C synopsis target-domain
Void GateH_leave(IGateProvider_Handle hdl, IArg key);
 
ARGUMENTS
hdl — IGateProvider.Handle
key — key returned by enter();
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId GateH_Module_id();
// Get this module's unique id
 
Bool GateH_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle GateH_Module_heap();
// The heap from which this module allocates memory
 
Bool GateH_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 GateH_Module_getMask();
// Returns the diagnostics mask for this module
 
Void GateH_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
XDCscript usage meta-domain sourced in xdc/runtime/knl/GateH.xdc
var GateH = xdc.useModule('xdc.runtime.knl.GateH');
local proxy modules
        GateH.Proxy.delegate$ = IGateProvider.Module null
        GateH.Proxy.abstractInstances$ = false
module-wide config parameters
 
 
proxy GateH.Proxy

Proxy used for optimization

XDCscript usage meta-domain
GateH.Proxy = IGateProvider.Module null
// some delegate module inheriting the IGateProvider interface
    GateH.Proxy.delegate$ = IGateProvider.Module null
    // explicit access to the currently bound delegate module
    GateH.Proxy.abstractInstances$ = false
    // use indirect runtime function calls if true
 
DETAILS
If ALL IGateProvider.Handles used by GateH are created using the same module (e.g GateProcess) then setting this Proxy to GateProcess and setting GateH.Proxy.abstractInstances$ = false, causes GateH APIs can have better performance.
 
metaonly config GateH.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
GateH.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.
generated on Thu, 01 Mar 2012 16:58:45 GMT