18 #ifndef LUNCHBOX_LOCK_H 
   19 #define LUNCHBOX_LOCK_H 
   22 #include <lunchbox/compiler.h> 
   23 #include <boost/noncopyable.hpp> 
   27 namespace detail { 
class Lock; }
 
   36 class Lock : 
public boost::noncopyable
 
   46     LUNCHBOX_API 
void set();
 
   49     LUNCHBOX_API 
void unset();
 
   66     LUNCHBOX_API 
bool trySet();
 
   75     LUNCHBOX_API 
bool isSet();
 
   78     detail::Lock* 
const _impl;
 
   81 #endif //LUNCHBOX_LOCK_H 
LUNCHBOX_API ~Lock()
Destruct the lock. 
 
Defines export visibility macros for Lunchbox. 
 
LUNCHBOX_API void unset()
Release the lock. 
 
LUNCHBOX_API Lock()
Construct a new lock. 
 
void setRead()
Acquire the lock shared with other readers. 
 
LUNCHBOX_API bool isSet()
Test if the lock is set. 
 
LUNCHBOX_API void set()
Acquire the lock. 
 
void unsetRead()
Release a shared read lock. 
 
LUNCHBOX_API bool trySet()
Attempt to acquire the lock. 
 
A lock (mutex) primitive.