1/* : : generated from contrib/ast/src/lib/libast/features/aso by iffe version 2012-07-17 : : */ 2#ifndef _def_aso_ast 3#define _def_aso_ast 1 4#define _sys_types 1 /* #include <sys/types.h> ok */ 5/* gcc 4.1+ 64 bit memory atomic operations model */ 6#define _aso_cas8(p,o,n) __sync_val_compare_and_swap(p,o,n) 7#define _aso_inc8(p) __sync_fetch_and_add(p,1) 8#define _aso_dec8(p) __sync_fetch_and_sub(p,1) 9#define _aso_cas16(p,o,n) __sync_val_compare_and_swap(p,o,n) 10#define _aso_inc16(p) __sync_fetch_and_add(p,1) 11#define _aso_dec16(p) __sync_fetch_and_sub(p,1) 12#define _aso_cas32(p,o,n) __sync_val_compare_and_swap(p,o,n) 13#define _aso_inc32(p) __sync_fetch_and_add(p,1) 14#define _aso_dec32(p) __sync_fetch_and_sub(p,1) 15#define _aso_cas64(p,o,n) __sync_val_compare_and_swap(p,o,n) 16#define _aso_inc64(p) __sync_fetch_and_add(p,1) 17#define _aso_dec64(p) __sync_fetch_and_sub(p,1) 18#if _ast_sizeof_pointer == 8 19#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint64_t)o,(uint64_t)n)) 20#else 21#define _aso_casptr(p,o,n) ((void*)__sync_val_compare_and_swap(p,(uint32_t)o,(uint32_t)n)) 22#endif 23 24#endif 25