18 #ifndef _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICREFERENCE_H_ 19 #define _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICREFERENCE_H_ 27 namespace concurrent {
33 template<
typename T >
65 void set( T* newValue ) {
static void * getAndSet(volatile void **target, void *value)
#define NULL
Definition: Config.h:33
std::string toString() const
static bool compareAndSet(volatile void **target, void *expect, void *update)
T * getAndSet(T *newValue)
Atomically sets to the given value and returns the old value.
Definition: AtomicReference.h:90
bool compareAndSet(T *expect, T *update)
Atomically sets the value to the given updated value if the current value == the expected value...
Definition: AtomicReference.h:79
std::string toString() const
Returns the String representation of the current value.
Definition: AtomicReference.h:98
An Pointer reference that may be updated atomically.
Definition: AtomicReference.h:34
AtomicReference()
Definition: AtomicReference.h:46
virtual ~AtomicReference()
Definition: AtomicReference.h:49
AtomicReference(T *value)
Definition: AtomicReference.h:47
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25