libmooshika
Macros
atomics.h File Reference

Go to the source code of this file.

Macros

#define atomic_postinc(x)   __sync_fetch_and_add(&x, 1)
 
#define atomic_postdec(x)   __sync_fetch_and_sub(&x, 1)
 
#define atomic_postadd(x, i)   __sync_fetch_and_add(&x, i)
 
#define atomic_postsub(x, i)   __sync_fetch_and_sub(&x, i)
 
#define atomic_postmask(x, i)   __sync_fetch_and_and(&x, i)
 
#define atomic_inc(x)   __sync_add_and_fetch(&x, 1)
 
#define atomic_dec(x)   __sync_sub_and_fetch(&x, 1)
 
#define atomic_add(x, i)   __sync_add_and_fetch(&x, i)
 
#define atomic_sub(x, i)   __sync_sub_and_fetch(&x, i)
 
#define atomic_mask(x, i)   __sync_and_and_fetch(&x, i)
 
#define atomic_bool_compare_and_swap   __sync_bool_compare_and_swap
 

Macro Definition Documentation

#define atomic_add (   x,
 
)    __sync_add_and_fetch(&x, i)
#define atomic_bool_compare_and_swap   __sync_bool_compare_and_swap
#define atomic_dec (   x)    __sync_sub_and_fetch(&x, 1)

Referenced by msk_getpd().

#define atomic_inc (   x)    __sync_add_and_fetch(&x, 1)
#define atomic_mask (   x,
 
)    __sync_and_and_fetch(&x, i)
#define atomic_postadd (   x,
 
)    __sync_fetch_and_add(&x, i)
#define atomic_postdec (   x)    __sync_fetch_and_sub(&x, 1)
#define atomic_postinc (   x)    __sync_fetch_and_add(&x, 1)

Referenced by msk_getpd().

#define atomic_postmask (   x,
 
)    __sync_fetch_and_and(&x, i)
#define atomic_postsub (   x,
 
)    __sync_fetch_and_sub(&x, i)
#define atomic_sub (   x,
 
)    __sync_sub_and_fetch(&x, i)