18 #ifndef LUNCHBOX_SPINLOCK_H 
   19 #define LUNCHBOX_SPINLOCK_H 
   21 #include <lunchbox/atomic.h>          
   22 #include <lunchbox/thread.h>          
   26 namespace detail { 
class SpinLock; }
 
   48     LUNCHBOX_API 
void set();
 
   51     LUNCHBOX_API 
void unset();
 
   59     LUNCHBOX_API 
bool trySet();
 
   81     LUNCHBOX_API 
bool isSet();
 
  100     detail::SpinLock* 
const _impl;
 
  103 #endif //LUNCHBOX_SPINLOCK_H 
bool trySetRead()
Attempt to acquire the lock shared with other readers. 
 
void set()
Acquire the lock exclusively. 
 
A fast lock for uncontended memory access. 
 
bool isSetWrite()
Test if the lock is set exclusively. 
 
bool trySet()
Attempt to acquire the lock exclusively. 
 
void setRead()
Acquire the lock shared with other readers. 
 
void unset()
Release an exclusive lock. 
 
bool isSetRead()
Test if the lock is set shared. 
 
~SpinLock()
Destruct the lock. 
 
bool isSet()
Test if the lock is set. 
 
Abstraction layer and common utilities for multi-threaded programming. 
 
void unsetRead()
Release a shared read lock. 
 
SpinLock()
Construct a new lock.