OpenImageIO
|
#include <thread.h>
Classes | |
class | read_lock_guard |
class | write_lock_guard |
Public Member Functions | |
spin_rw_mutex (void) | |
spin_rw_mutex (const spin_rw_mutex &) | |
const spin_rw_mutex & | operator= (const spin_rw_mutex &) |
void | read_lock () |
void | read_unlock () |
void | write_lock () |
void | write_unlock () |
Spinning reader/writer mutex. This is just like spin_mutex, except that there are separate locking mechanisms for "writers" (exclusive holders of the lock, presumably because they are modifying whatever the lock is protecting) and "readers" (non-exclusive, non-modifying tasks that may access the protectee simultaneously).
|
inline |
Default constructor – initialize to unlocked.
|
inline |
Copy constructor – initialize to unlocked.
|
inline |
Assignment does not do anything, since lockedness should not transfer.
|
inline |
Acquire the reader lock.
|
inline |
Release the reader lock.
|
inline |
Acquire the writer lock.
|
inline |
Release the writer lock.