module ti.sdo.fc.utils.osal.OsalFactory

Factory to create osal objects

createSem() creates either a SemaphoreMP or a Semaphore object, depending on ti.sdo.fc.Settings.multiProcess. This function returns the Semaphore or SemaphoreMP handle cast as an ISemaphore handle. This allows the caller to use the ISemaphore functions (eg, pend(), post()), without having to make a check on whether to use Semaphore functions or SemaphoreMP functions on the handle.
C synopsis target-domain sourced in ti/sdo/fc/utils/osal/OsalFactory.xdc
 
OsalFactory_createSem()  // module-wide

Create a SemaphoreMP object if ti.sdo.fc.Settings.multiProcess is true, otherwise create a Semaphore object

C synopsis target-domain
ISemaphore_Handle OsalFactory_createSem(Int count, Int key, Error_Block *eb);
 
ARGUMENTS
count — The count to initialize the semaphore with
key — A key for multi-process semaphore (if needed).
RETURNS
The Semaphore or SemaphoreMP handle, cast as an ISemaphore handle.
 
OsalFactory_deleteSem()  // module-wide

Delete the semaphore created in createSem()

C synopsis target-domain
Void OsalFactory_deleteSem(ISemaphore_Handle h);
 
ARGUMENTS
h — Handle returned by createSem().
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId OsalFactory_Module_id();
// Get this module's unique id
 
Bool OsalFactory_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle OsalFactory_Module_heap();
// The heap from which this module allocates memory
 
Bool OsalFactory_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 OsalFactory_Module_getMask();
// Returns the diagnostics mask for this module
 
Void OsalFactory_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
XDCscript usage meta-domain sourced in ti/sdo/fc/utils/osal/OsalFactory.xdc
var OsalFactory = xdc.useModule('ti.sdo.fc.utils.osal.OsalFactory');
module-wide config parameters
 
 
metaonly config OsalFactory.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
OsalFactory.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, 15 Dec 2011 10:52:02 GMT