Go to the source code of this file.
Classes | |
struct | oro_atomic_t |
Defines | |
#define | ORO_ATOMIC_CLEANUP(a_int) |
#define | oro_atomic_read(a_int) ((a_int)->cnt) |
#define | oro_atomic_set(a_int, n) (((a_int)->cnt) = (n)) |
#define | ORO_ATOMIC_SETUP oro_atomic_set |
#define | oro_cmpxchg(ptr, o, n) ((__typeof__(*(ptr)))__sync_val_compare_and_swap((ptr),(o),(n))) |
Functions | |
static __inline__ void | oro_atomic_add (oro_atomic_t *a_int, int n) |
static __inline__ void | oro_atomic_dec (oro_atomic_t *a_int) |
static __inline__ int | oro_atomic_dec_and_test (oro_atomic_t *a_int) |
static __inline__ void | oro_atomic_inc (oro_atomic_t *a_int) |
static __inline__ int | oro_atomic_inc_and_test (oro_atomic_t *a_int) |
static __inline__ void | oro_atomic_sub (oro_atomic_t *a_int, int n) |
static __inline__ int | oro_atomic_sub_and_test (oro_atomic_t *a_int, int n) |
#define ORO_ATOMIC_CLEANUP | ( | a_int | ) |
Definition at line 16 of file oro_gcc/oro_arch.h.
#define oro_atomic_read | ( | a_int | ) | ((a_int)->cnt) |
Definition at line 18 of file oro_gcc/oro_arch.h.
#define oro_atomic_set | ( | a_int, | |
n | |||
) | (((a_int)->cnt) = (n)) |
Definition at line 20 of file oro_gcc/oro_arch.h.
#define ORO_ATOMIC_SETUP oro_atomic_set |
Definition at line 15 of file oro_gcc/oro_arch.h.
#define oro_cmpxchg | ( | ptr, | |
o, | |||
n | |||
) | ((__typeof__(*(ptr)))__sync_val_compare_and_swap((ptr),(o),(n))) |
Compare o with *ptr and swap with n if equal.
Definition at line 81 of file oro_gcc/oro_arch.h.
static __inline__ void oro_atomic_add | ( | oro_atomic_t * | a_int, |
int | n | ||
) | [static] |
Add n to a_int
Definition at line 25 of file oro_gcc/oro_arch.h.
static __inline__ void oro_atomic_dec | ( | oro_atomic_t * | a_int | ) | [static] |
Decrement a_int atomically
Definition at line 57 of file oro_gcc/oro_arch.h.
static __inline__ int oro_atomic_dec_and_test | ( | oro_atomic_t * | a_int | ) | [static] |
Decrement a_int atomically and test for zero.
Definition at line 65 of file oro_gcc/oro_arch.h.
static __inline__ void oro_atomic_inc | ( | oro_atomic_t * | a_int | ) | [static] |
Increment a_int atomically
Definition at line 49 of file oro_gcc/oro_arch.h.
static __inline__ int oro_atomic_inc_and_test | ( | oro_atomic_t * | a_int | ) | [static] |
Increment a_int atomically and test for zero.
Definition at line 73 of file oro_gcc/oro_arch.h.
static __inline__ void oro_atomic_sub | ( | oro_atomic_t * | a_int, |
int | n | ||
) | [static] |
Substract n from a_int
Definition at line 33 of file oro_gcc/oro_arch.h.
static __inline__ int oro_atomic_sub_and_test | ( | oro_atomic_t * | a_int, |
int | n | ||
) | [static] |
Substract n from a_int and test for zero
Definition at line 41 of file oro_gcc/oro_arch.h.