15 #ifndef ATOMICADJUSTWIN32IMPL_H 16 #define ATOMICADJUSTWIN32IMPL_H 18 #include "dtoolbase.h" 19 #include "selectThreadImpl.h" 23 #include "numeric_types.h" 25 #ifndef WIN32_LEAN_AND_MEAN 26 #define WIN32_LEAN_AND_MEAN 1 35 class EXPCL_DTOOL AtomicAdjustWin32Impl {
39 typedef ALIGN_8BYTE LONGLONG Integer;
40 typedef void *UnalignedPointer;
41 typedef ALIGN_8BYTE UnalignedPointer Pointer;
43 typedef ALIGN_4BYTE LONG Integer;
44 typedef void *UnalignedPointer;
45 typedef ALIGN_4BYTE UnalignedPointer Pointer;
48 INLINE
static void inc(TVOLATILE Integer &var);
49 INLINE
static bool dec(TVOLATILE Integer &var);
50 INLINE
static void add(TVOLATILE Integer &var, Integer delta);
51 INLINE
static Integer
set(TVOLATILE Integer &var, Integer new_value);
52 INLINE
static Integer
get(
const TVOLATILE Integer &var);
54 INLINE
static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value);
55 INLINE
static Pointer get_ptr(
const TVOLATILE Pointer &var);
57 INLINE
static Integer compare_and_exchange(TVOLATILE Integer &mem,
61 INLINE
static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem,
66 #include "atomicAdjustWin32Impl.I"