15 #ifndef ATOMICADJUSTI386IMPL_H 16 #define ATOMICADJUSTI386IMPL_H 18 #include "dtoolbase.h" 19 #include "selectThreadImpl.h" 21 #if (defined(__i386__) || defined(_M_IX86)) && !defined(__APPLE__) 23 #include "numeric_types.h" 32 class EXPCL_DTOOL AtomicAdjustI386Impl {
34 typedef ALIGN_4BYTE PN_int32 Integer;
35 typedef void *UnalignedPointer;
36 typedef ALIGN_4BYTE UnalignedPointer Pointer;
38 INLINE
static void inc(TVOLATILE Integer &var);
39 INLINE
static bool dec(TVOLATILE Integer &var);
40 INLINE
static void add(TVOLATILE Integer &var, Integer delta);
41 INLINE
static Integer
set(TVOLATILE Integer &var, Integer new_value);
42 INLINE
static Integer
get(
const TVOLATILE Integer &var);
44 INLINE
static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value);
45 INLINE
static Pointer get_ptr(
const TVOLATILE Pointer &var);
47 INLINE
static Integer compare_and_exchange(TVOLATILE Integer &mem,
51 INLINE
static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem,
56 #include "atomicAdjustI386Impl.I"