14 #ifndef ATOMICADJUSTGCCIMPL_H 15 #define ATOMICADJUSTGCCIMPL_H 20 #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (defined(__clang__) && (__clang_major__ >= 3)) 25 class EXPCL_DTOOL_DTOOLBASE AtomicAdjustGccImpl {
27 #if __GCC_ATOMIC_LONG_LOCK_FREE >= __GCC_ATOMIC_INT_LOCK_FREE 29 typedef __attribute__ ((aligned (__SIZEOF_LONG__)))
long Integer;
31 typedef __attribute__ ((aligned (__SIZEOF_INT__)))
int Integer;
33 typedef void *UnalignedPointer;
34 typedef __attribute__ ((aligned (__SIZEOF_POINTER__))) UnalignedPointer Pointer;
36 INLINE
static void inc(TVOLATILE Integer &var);
37 INLINE
static bool dec(TVOLATILE Integer &var);
38 INLINE
static Integer add(TVOLATILE Integer &var, Integer delta);
39 INLINE
static Integer set(TVOLATILE Integer &var, Integer new_value);
40 INLINE
static Integer get(
const TVOLATILE Integer &var);
42 INLINE
static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value);
43 INLINE
static Pointer get_ptr(
const TVOLATILE Pointer &var);
45 INLINE
static Integer compare_and_exchange(TVOLATILE Integer &mem,
49 INLINE
static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem,
56 #endif // HAVE_POSIX_THREADS PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.