00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ATOMICADJUSTDUMMYIMPL_H
00016 #define ATOMICADJUSTDUMMYIMPL_H
00017
00018 #include "dtoolbase.h"
00019 #include "selectThreadImpl.h"
00020
00021 #include "numeric_types.h"
00022
00023
00024
00025
00026
00027
00028
00029 class EXPCL_DTOOL AtomicAdjustDummyImpl {
00030 public:
00031 typedef long Integer;
00032 typedef void *Pointer;
00033
00034 INLINE static void inc(TVOLATILE Integer &var);
00035 INLINE static bool dec(TVOLATILE Integer &var);
00036 INLINE static void add(TVOLATILE Integer &var, Integer delta);
00037 INLINE static Integer set(TVOLATILE Integer &var, Integer new_value);
00038 INLINE static Integer get(const TVOLATILE Integer &var);
00039
00040 INLINE static Pointer set_ptr(TVOLATILE Pointer &var, Pointer new_value);
00041 INLINE static Pointer get_ptr(const TVOLATILE Pointer &var);
00042
00043 INLINE static Integer compare_and_exchange(TVOLATILE Integer &mem,
00044 Integer old_value,
00045 Integer new_value);
00046
00047 INLINE static Pointer compare_and_exchange_ptr(TVOLATILE Pointer &mem,
00048 Pointer old_value,
00049 Pointer new_value);
00050 };
00051
00052 #include "atomicAdjustDummyImpl.I"
00053
00054 #endif