39 #ifndef OS_COMMON_CAS_HPP 40 #define OS_COMMON_CAS_HPP 53 template<
class T,
class V,
class W >
54 bool CAS(
volatile T* addr,
const V& expected,
const W& value) {
55 return expected ==
oro_cmpxchg(addr, expected, value);
#define oro_cmpxchg(ptr, o, n)
Compare o with *ptr and swap with n if equal.
bool CAS(volatile T *addr, const V &expected, const W &value)
Compare And Swap.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.