39 #ifndef OS_COMMON_ORO_ATOMIC_HPP 40 #define OS_COMMON_ORO_ATOMIC_HPP
AtomicInt(const AtomicInt &orig)
C++ abstraction of atomic integer operations.
bool sub_and_test(int i)
Subtract a value and test if the result is zero.
int oro_atomic_inc_and_test(oro_atomic_t *a)
Increment a atomically and test for zero.
int oro_atomic_read(oro_atomic_t *a)
Returns the current counter value of the atomic structure a.
bool inc_and_test()
Increment and test if the result is zero.
bool dec_and_test()
Decrement and test if the result is zero.
void oro_atomic_inc(oro_atomic_t *a)
Increment a atomically.
void ORO_ATOMIC_SETUP(oro_atomic_t *a, int n)
Initializes the uninitialized atomic structure a with a counter value of 'n'.
const AtomicInt & operator=(const AtomicInt &orig)
void ORO_ATOMIC_CLEANUP(oro_atomic_t *a)
Cleans up all resources allocated durint the setup of atomic structure a.
void oro_atomic_sub(int n, oro_atomic_t *a, int n)
Subtract n from a.
int oro_atomic_dec_and_test(oro_atomic_t *a)
Decrement a atomically and test for zero.
int oro_atomic_sub_and_test(oro_atomic_t *a, int n)
Subtract n from a and test for zero.
void oro_atomic_set(oro_atomic_t *a, int n)
Sets the current counter value of the atomic structure a to n.
int read() const
Read the current value of the integer.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
void oro_atomic_dec(oro_atomic_t *a)
Decrement a atomically.
Structure that contains an int for atomic operations.
void oro_atomic_add(oro_atomic_t *a, int n)
Add n to a.