32#ifndef _RWSTD_RW_ATOMIC_H_INCLUDED
33#define _RWSTD_RW_ATOMIC_H_INCLUDED
37# pragma GCC system_header
41#ifndef _RWSTD_RW_DEFS_H_INCLUDED
46#ifdef _RWSTD_REENTRANT
48# if defined (_RWSTD_NO_ATOMIC_OPS)
50# elif defined (__DECCXX)
52# elif defined (__sparc) && (defined (__SUNPRO_CC) || defined (__GNUG__))
54# elif defined (_AIX43) && defined (__IBMCPP__)
56# elif defined (__sgi) && defined (__host_mips)
58# elif defined (_PA_RISC2_0)
60# elif defined (__GNUG__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 401) \
61 && (defined (__i486__) || defined (__x86_64) || defined (__ia64)) \
62 && !defined (__INTEL_COMPILER) \
63 || (defined (__INTEL_COMPILER) && defined (__ia64))
65# elif defined (__i386__) && (defined (__GNUG__) \
66 || defined (__INTEL_COMPILER)) || defined (_M_IX86)
68# elif defined (__ia64) || defined (__x86_64) || defined (_M_X64)
71# define _RWSTD_NO_ATOMIC_OPS
74# ifndef _RWSTD_NO_ATOMIC_OPS
78# ifndef _RWSTD_NO_BOOL
80# if _RWSTD_BOOL_SIZE == _RWSTD_CHAR_SIZE \
81 && !defined (_RWSTD_NO_CHAR_ATOMIC_OPS)
82# define _RWSTD_BOOL_TYPE char
83# elif _RWSTD_BOOL_SIZE == _RWSTD_SHORT_SIZE \
84 && !defined (_RWSTD_NO_SHORT_ATOMIC_OPS)
85# define _RWSTD_BOOL_TYPE short
86# elif _RWSTD_BOOL_SIZE == _RWSTD_INT_SIZE \
87 && !defined (_RWSTD_NO_INT_ATOMIC_OPS)
88# define _RWSTD_BOOL_TYPE int
91# ifdef _RWSTD_BOOL_TYPE
96__rw_atomic_exchange (
bool &__x,
bool __y,
bool)
98 return 0 != __rw_atomic_exchange (
106# undef _RWSTD_BOOL_TYPE
114# if _RWSTD_LONG_SIZE == _RWSTD_INT_SIZE \
115 && defined (_RWSTD_NO_LONG_ATOMIC_OPS) \
116 && !defined (_RWSTD_NO_INT_ATOMIC_OPS)
118# undef _RWSTD_NO_LONG_ATOMIC_OPS
120# if 6 == _RWSTD_HP_aCC_MAJOR
124# pragma diag_suppress 4230
130__rw_atomic_preincrement (
long &__x,
bool)
137__rw_atomic_preincrement (
unsigned long &__x,
bool)
144__rw_atomic_predecrement (
long &__x,
bool)
151__rw_atomic_predecrement (
unsigned long &__x,
bool)
158__rw_atomic_exchange (
long &__x,
long __y,
bool)
166__rw_atomic_exchange (
unsigned long &__x,
167 unsigned long __y,
bool)
176# if 6 == _RWSTD_HP_aCC_MAJOR
177# pragma diag_default 4230
185# if defined (_RWSTD_LONG_LONG) \
186 && _RWSTD_LLONG_SIZE == _RWSTD_LONG_SIZE \
187 && defined (_RWSTD_NO_LLONG_ATOMIC_OPS) \
188 && !defined (_RWSTD_NO_LONG_ATOMIC_OPS)
190# undef _RWSTD_NO_LLONG_ATOMIC_OPS
250template <
class _TypeT,
class _TypeU>
252_TypeT __rw_atomic_exchange (_TypeT &__t,
const _TypeU &__u,
bool)
268template <
class _TypeT,
class _TypeU>
270_TypeT __rw_ordinary_exchange (_TypeT &__t,
const _TypeU &__u)
#define _RWSTD_REINTERPRET_CAST(T, x)
#define _RWSTD_STATIC_CAST(T, x)
#define _RWSTD_NAMESPACE(name)