40 #ifndef __ARCH_NOASM_ORO_ATOMIC__ 41 #define __ARCH_NOASM_ORO_ATOMIC__ 48 #include "../../rtt-config.h" 64 #define ORO_ATOMIC_SETUP(a_int,n) rtos_mutex_init(&((a_int)->m)); (a_int)->cnter = (n) 65 #define ORO_ATOMIC_CLEANUP(a_int) rtos_mutex_destroy(&((a_int)->m)) 67 #define oro_atomic_read(a_int) ((a_int)->cnter) 69 #define oro_atomic_set(a_int,n) (((a_int)->cnter) = (n)) int rtos_mutex_unlock(rt_mutex_t *m)
int oro_atomic_inc_and_test(oro_atomic_t *a)
Increment a atomically and test for zero.
void oro_atomic_inc(oro_atomic_t *a)
Increment a atomically.
volatile long oro_atomic_t
int rtos_mutex_lock(rt_mutex_t *m)
void oro_atomic_sub(int n, oro_atomic_t *a, int n)
Substract 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)
Substract n from a and test for zero.
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.