47 #ifndef _MIRA_SPINLOCK_H_ 48 #define _MIRA_SPINLOCK_H_ 51 #include <boost/thread.hpp> 101 boost::this_thread::yield();
114 volatile uint32 mLocked;
void sleeplock()
Locks the spinlock.
Definition: Spinlock.h:98
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
void unlock()
Unlocks the spinlock.
Definition: Spinlock.h:107
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
void lock()
Locks the spinlock.
Definition: Spinlock.h:89
Contains methods for simple atomic operations (such as increment, etc.) that are thread-safe without ...
uint32 cas(volatile uint32 *var, uint32 value, uint32 cmp)
Compare And Swap.
Definition: Atomic.h:120
bool try_lock()
Tries to lock the spinlock.
Definition: Spinlock.h:80
A spinlock is similar to a mutex and allows thread synchronization of critical sections.
Definition: Spinlock.h:68
Spinlock()
Definition: Spinlock.h:72