33#if defined (__ia64) && defined (__INTEL_COMPILER)
34# include <ia64intrin.h>
40__rw_atomic_preincrement (
char &__x,
bool)
43 return __sync_add_and_fetch (&__x, 1);
48__rw_atomic_preincrement (
signed char &__x,
bool)
51 return __sync_add_and_fetch (&__x, 1);
56__rw_atomic_preincrement (
unsigned char &__x,
bool)
59 return __sync_add_and_fetch (&__x, 1);
64__rw_atomic_preincrement (
short &__x,
bool)
67 return __sync_add_and_fetch (&__x, 1);
72__rw_atomic_preincrement (
unsigned short &__x,
bool)
75 return __sync_add_and_fetch (&__x, 1);
80__rw_atomic_preincrement (
int &__x,
bool)
83 return __sync_add_and_fetch (&__x, 1);
88__rw_atomic_preincrement (
unsigned int &__x,
bool)
91 return __sync_add_and_fetch (&__x, 1);
96__rw_atomic_predecrement (
char &__x,
bool)
99 return __sync_sub_and_fetch (&__x, 1);
104__rw_atomic_predecrement (
signed char &__x,
bool)
107 return __sync_sub_and_fetch (&__x, 1);
112__rw_atomic_predecrement (
unsigned char &__x,
bool)
115 return __sync_sub_and_fetch (&__x, 1);
120__rw_atomic_predecrement (
short &__x,
bool)
123 return __sync_sub_and_fetch (&__x, 1);
128__rw_atomic_predecrement (
unsigned short &__x,
bool)
131 return __sync_sub_and_fetch (&__x, 1);
136__rw_atomic_predecrement (
int &__x,
bool)
139 return __sync_sub_and_fetch (&__x, 1);
144__rw_atomic_predecrement (
unsigned int &__x,
bool)
147 return __sync_sub_and_fetch (&__x, 1);
152__rw_atomic_exchange (
char &__x,
char __y,
bool)
155 return __sync_lock_test_and_set (&__x, __y);
160__rw_atomic_exchange (
signed char &__x,
signed char __y,
bool)
163 return __sync_lock_test_and_set (&__x, __y);
168__rw_atomic_exchange (
unsigned char &__x,
unsigned char __y,
bool)
171 return __sync_lock_test_and_set (&__x, __y);
176__rw_atomic_exchange (
short &__x,
short __y,
bool)
179 return __sync_lock_test_and_set (&__x, __y);
184__rw_atomic_exchange (
unsigned short &__x,
unsigned short __y,
bool)
187 return __sync_lock_test_and_set (&__x, __y);
192__rw_atomic_exchange (
int &__x,
int __y,
bool)
195 return __sync_lock_test_and_set (&__x, __y);
200__rw_atomic_exchange (
unsigned int &__x,
unsigned int __y,
bool)
203 return __sync_lock_test_and_set (&__x, __y);
207#if defined (__ia64) || defined (__x86_64)
208# if 4 < _RWSTD_LONG_SIZE
211__rw_atomic_preincrement (
long &__x,
bool)
214 return __sync_add_and_fetch (&__x, 1);
219__rw_atomic_preincrement (
unsigned long &__x,
bool)
222 return __sync_add_and_fetch (&__x, 1);
227__rw_atomic_predecrement (
long &__x,
bool)
230 return __sync_sub_and_fetch (&__x, 1);
235__rw_atomic_predecrement (
unsigned long &__x,
bool)
238 return __sync_sub_and_fetch (&__x, 1);
243__rw_atomic_exchange (
long &__x,
long __y,
bool)
246 return __sync_lock_test_and_set (&__x, __y);
251__rw_atomic_exchange (
unsigned long &__x,
unsigned long __y,
bool)
254 return __sync_lock_test_and_set (&__x, __y);
258# define _RWSTD_NO_LONG_ATOMIC_OPS
262# if defined (_RWSTD_LONG_LONG) && (_RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE)
268 return __sync_add_and_fetch (&__x, 1);
276 return __sync_add_and_fetch (&__x, 1);
284 return __sync_sub_and_fetch (&__x, 1);
292 return __sync_sub_and_fetch (&__x, 1);
300 return __sync_lock_test_and_set (&__x, __y);
309 return __sync_lock_test_and_set (&__x, __y);
313# define _RWSTD_NO_LLONG_ATOMIC_OPS
317# define _RWSTD_NO_LONG_ATOMIC_OPS
318# define _RWSTD_NO_LLONG_ATOMIC_OPS
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_COMPILE_ASSERT(const_expr)