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 ... ]
#include <ti/mcu/msp430/runtime/utils/Atomic.h>
Functions |
Void | |
Void | |
Functions common to all target modules |
|
|
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
Void Atomic_dec8(UInt8 *val);
Atomic_inc8() // module-wide |
|
Atomically increment val by 1
Void Atomic_inc8(UInt8 *val);
Module-Wide Built-Ins |
|
// Get this module's unique id
Bool Atomic_Module_startupDone();
// Test if this module has completed startup
// 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
var Atomic = xdc.useModule('ti.mcu.msp430.runtime.utils.Atomic');
module-wide config parameters
generated on Thu, 27 Sep 2012 23:22:30 GMT