Orocos Real-Time Toolkit  2.9.0
oro_arch_interface.h
Go to the documentation of this file.
1 #ifndef __ORO_ARCH_INTERFACE__
2 #define __ORO_ARCH_INTERFACE__
3 
25 struct oro_atomic_t_interface;
26 typedef struct oro_atomic_t_interface oro_atomic_t;
27 
32 void ORO_ATOMIC_SETUP(oro_atomic_t* a, int n);
33 
39 
45 
50 void oro_atomic_set(oro_atomic_t* a, int n);
51 
55 void oro_atomic_add(oro_atomic_t *a, int n);
56 
60 int oro_atomic_add_return(oro_atomic_t *a, int n);
61 
65 void oro_atomic_sub(int n, oro_atomic_t *a, int n);
66 
70 int oro_atomic_sub_return(int n, oro_atomic_t *a, int n);
71 
76 
81 
86 
91 
96 
101 
106 
115 int oro_cmpxchg(void volatile* ptr, unsigned long o, unsigned long n);
116 
117 
118 #endif // __ORO_ARCH_INTERFACE__
int oro_atomic_inc_return(oro_atomic_t *a)
Increment a atomically and return the new value.
int oro_atomic_inc_and_test(oro_atomic_t *a)
Increment a atomically and test for zero.
int oro_atomic_sub_return(int n, oro_atomic_t *a, int n)
Subtract n from a and return the new value.
int oro_atomic_read(oro_atomic_t *a)
Returns the current counter value of the atomic structure a.
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'.
void ORO_ATOMIC_CLEANUP(oro_atomic_t *a)
Cleans up all resources allocated durint the setup of atomic structure a.
int oro_cmpxchg(void volatile *ptr, unsigned long o, unsigned long n)
Compare o with *ptr and swap with n if equal.
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 oro_atomic_dec_return(oro_atomic_t *a)
Decrement a atomically and return the new value.
void oro_atomic_dec(oro_atomic_t *a)
Decrement a atomically.
Structure that contains an int for atomic operations.
Definition: oro_arch.h:10
int oro_atomic_add_return(oro_atomic_t *a, int n)
Add n to a and return the new value.
void oro_atomic_add(oro_atomic_t *a, int n)
Add n to a.