8#ifndef INCLUDED_BSLS_ATOMICOPERATIONS_POWERPC32_AIX_XLC
9#define INCLUDED_BSLS_ATOMICOPERATIONS_POWERPC32_AIX_XLC
54#include <bsls_atomicoperations_powerpc_aix_xlc_default.h>
58#if defined(BSLS_PLATFORM_CPU_POWERPC) && defined(BSLS_PLATFORM_CMP_IBM) \
59 && defined(BSLS_PLATFORM_CPU_32_BIT)
79void bsls_AtomicOperations_Powerpc32_SetInt64(
84void bsls_AtomicOperations_Powerpc32_SetInt64Relaxed(
89void bsls_AtomicOperations_Powerpc32_SetInt64Release(
132struct AtomicOperations_POWERPC32_AIX_XLC;
133typedef AtomicOperations_POWERPC32_AIX_XLC AtomicOperations_Imp;
140struct Atomic_TypeTraits<AtomicOperations_POWERPC32_AIX_XLC>
144 volatile int d_value __attribute__((__aligned__(
sizeof(
int))));
149 volatile Types::Int64 d_value
150 __attribute__((__aligned__(
sizeof(Types::Int64))));
155 volatile unsigned int d_value
156 __attribute__((__aligned__(
sizeof(
unsigned int))));
161 volatile Types::Uint64 d_value
162 __attribute__((__aligned__(
sizeof(Types::Uint64))));
167 void *
volatile d_value __attribute__((__aligned__(
sizeof(
void *))));
175struct AtomicOperations_POWERPC32_AIX_XLC
176 : AtomicOperations_POWERPC_AIX_XLC_Default32<
177 AtomicOperations_POWERPC32_AIX_XLC>
179 typedef Atomic_TypeTraits<AtomicOperations_POWERPC32_AIX_XLC>
184 static Types::Int64 getInt64(
const AtomicTypes::Int64 *atomicInt);
186 static Types::Int64 getInt64Relaxed(
const AtomicTypes::Int64 *atomicInt);
188 static Types::Int64 getInt64Acquire(
const AtomicTypes::Int64 *atomicInt);
190 static void setInt64(AtomicTypes::Int64 *atomicInt, Types::Int64 value);
192 static void setInt64Relaxed(AtomicTypes::Int64 *atomicInt,
195 static void setInt64Release(AtomicTypes::Int64 *atomicInt,
198 static Types::Int64 swapInt64(AtomicTypes::Int64 *atomicInt,
199 Types::Int64 swapValue);
201 static Types::Int64 swapInt64AcqRel(AtomicTypes::Int64 *atomicInt,
202 Types::Int64 swapValue);
204 static Types::Int64 testAndSwapInt64(AtomicTypes::Int64 *atomicInt,
205 Types::Int64 compareValue,
206 Types::Int64 swapValue);
208 static Types::Int64 testAndSwapInt64AcqRel(AtomicTypes::Int64 *atomicInt,
209 Types::Int64 compareValue,
210 Types::Int64 swapValue);
212 static Types::Int64 addInt64Nv(AtomicTypes::Int64 *atomicInt,
215 static Types::Int64 addInt64NvRelaxed(AtomicTypes::Int64 *atomicInt,
218 static Types::Int64 addInt64NvAcqRel(AtomicTypes::Int64 *atomicInt,
232 getInt64(
const AtomicTypes::Int64 *atomicInt)
234 return AtomicOperations_Powerpc32_GetInt64(&atomicInt->d_value);
239 getInt64Relaxed(
const AtomicTypes::Int64 *atomicInt)
241 return AtomicOperations_Powerpc32_GetInt64Relaxed(&atomicInt->d_value);
246 getInt64Acquire(
const AtomicTypes::Int64 *atomicInt)
248 return AtomicOperations_Powerpc32_GetInt64Acquire(&atomicInt->d_value);
252void AtomicOperations_POWERPC32_AIX_XLC::
253 setInt64(AtomicTypes::Int64 *atomicInt,
Types::Int64 value)
255 bsls_AtomicOperations_Powerpc32_SetInt64(&atomicInt->d_value, value);
259void AtomicOperations_POWERPC32_AIX_XLC::
260 setInt64Relaxed(AtomicTypes::Int64 *atomicInt,
Types::Int64 value)
262 bsls_AtomicOperations_Powerpc32_SetInt64Relaxed(&atomicInt->d_value,
267void AtomicOperations_POWERPC32_AIX_XLC::
268 setInt64Release(AtomicTypes::Int64 *atomicInt,
Types::Int64 value)
270 bsls_AtomicOperations_Powerpc32_SetInt64Release(&atomicInt->d_value,
276 swapInt64(AtomicTypes::Int64 *atomicInt,
279 return bsls_AtomicOperations_Powerpc32_SwapInt64(&atomicInt->d_value,
285 swapInt64AcqRel(AtomicTypes::Int64 *atomicInt,
288 return bsls_AtomicOperations_Powerpc32_SwapInt64AcqRel(&atomicInt->d_value,
294 testAndSwapInt64(AtomicTypes::Int64 *atomicInt,
298 return bsls_AtomicOperations_Powerpc32_testAndSwapInt64(
306 testAndSwapInt64AcqRel(AtomicTypes::Int64 *atomicInt,
310 return bsls_AtomicOperations_Powerpc32_testAndSwapInt64AcqRel(
318 addInt64Nv(AtomicTypes::Int64 *atomicInt,
321 return bsls_AtomicOperations_Powerpc32_AddInt64(&atomicInt->d_value,
327 addInt64NvRelaxed(AtomicTypes::Int64 *atomicInt,
330 return bsls_AtomicOperations_Powerpc32_AddInt64Relaxed(&atomicInt->d_value,
336 addInt64NvAcqRel(AtomicTypes::Int64 *atomicInt,
339 return bsls_AtomicOperations_Powerpc32_AddInt64AcqRel(&atomicInt->d_value,
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlt_iso8601util.h:691
long long Int64
Definition bsls_types.h:132