module ti.mcu.msp430.runtime.utils.Atomic

Simple atomic operations on integers

This module provides simple "atomic" operations on integral variables. These operations reliably read, modify, and store a specified value even in the face of preempting threads that modify the same variables. [ more ... ]
C synopsis target-domain sourced in ti/mcu/msp430/runtime/utils/Atomic.xdc
DETAILS
This module provides simple "atomic" operations on integral variables. These operations reliably read, modify, and store a specified value even in the face of preempting threads that modify the same variables.
Atomic operations are used as a simple counting semaphore between an appliation and an interrupt service ruotine, for example.
 
Atomic_dec8()  // module-wide

Atomically decrement val by 1

C synopsis target-domain
Void Atomic_dec8(UInt8 *val);
 
 
Atomic_inc8()  // module-wide

Atomically increment val by 1

C synopsis target-domain
Void Atomic_inc8(UInt8 *val);
 
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId Atomic_Module_id();
// Get this module's unique id
 
Bool Atomic_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle Atomic_Module_heap();
// The heap from which this module allocates memory
 
Bool Atomic_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 Atomic_Module_getMask();
// Returns the diagnostics mask for this module
 
Void Atomic_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
XDCscript usage meta-domain sourced in ti/mcu/msp430/runtime/utils/Atomic.xdc
var Atomic = xdc.useModule('ti.mcu.msp430.runtime.utils.Atomic');
module-wide config parameters
 
 
metaonly config Atomic.common$  // module-wide

Common module configuration parameters

XDCscript usage meta-domain
Atomic.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 Mon, 02 May 2011 23:06:50 GMT