Orocos Real-Time Toolkit  2.9.0
Classes | Macros
oro_arch.h File Reference
#include "../../rtt-config.h"

Go to the source code of this file.

Classes

struct  oro_atomic_t
 Structure that contains an int for atomic operations. More...
 

Macros

#define ORO_ATOMIC_SETUP   oro_atomic_set
 
#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_cmpxchg(ptr, o, n)   ((__typeof__(*(ptr)))__sync_val_compare_and_swap((ptr),(o),(n)))
 Compare o with *ptr and swap with n if equal. More...
 

Macro Definition Documentation

#define ORO_ATOMIC_CLEANUP (   a_int)

Definition at line 15 of file oro_arch.h.

#define oro_atomic_read (   a_int)    ((a_int)->cnt)

Definition at line 17 of file oro_arch.h.

#define oro_atomic_set (   a_int,
 
)    (((a_int)->cnt) = (n))

Definition at line 19 of file oro_arch.h.

#define ORO_ATOMIC_SETUP   oro_atomic_set

Definition at line 14 of file oro_arch.h.

#define oro_cmpxchg (   ptr,
  o,
 
)    ((__typeof__(*(ptr)))__sync_val_compare_and_swap((ptr),(o),(n)))

Compare o with *ptr and swap with n if equal.

Definition at line 112 of file oro_arch.h.

Referenced by RTT::os::CAS().