50 #ifndef _MIRA_ATOMIC_H_ 51 #define _MIRA_ATOMIC_H_ 54 #include <boost/version.hpp> 55 #include <boost/interprocess/detail/atomic.hpp> 61 #if BOOST_VERSION >= 104800 62 #define MIRA_BOOST_DETAIL_NAMESPACE ipcdetail 64 #define MIRA_BOOST_DETAIL_NAMESPACE detail 82 inline uint32
inc(
volatile uint32* var) {
83 return boost::interprocess::MIRA_BOOST_DETAIL_NAMESPACE::atomic_inc32(var);
96 inline uint32
dec(
volatile uint32* var) {
97 return boost::interprocess::MIRA_BOOST_DETAIL_NAMESPACE::atomic_dec32(var);
103 inline void write(
volatile uint32* var, uint32 value) {
104 boost::interprocess::MIRA_BOOST_DETAIL_NAMESPACE::atomic_write32(var, value);
120 inline uint32
cas(
volatile uint32* var, uint32 value, uint32 cmp) {
121 return boost::interprocess::MIRA_BOOST_DETAIL_NAMESPACE::atomic_cas32(var, value, cmp);
Typedefs for OS independent basic data types.
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
void write(volatile uint32 *var, uint32 value)
Sets the value of the variable pointed to by var in an atomic operation.
Definition: Atomic.h:103
uint32 cas(volatile uint32 *var, uint32 value, uint32 cmp)
Compare And Swap.
Definition: Atomic.h:120
uint32 dec(volatile uint32 *var)
Decrements the value of the variable pointed to by var and returns its old value. ...
Definition: Atomic.h:96
uint32 inc(volatile uint32 *var)
Increments the value of the variable pointed to by var and returns its old value. ...
Definition: Atomic.h:82