![]() |
Vulkan SDK for Android 1.1.1
Mali Developer Center
|
Implements a read-write lock. More...
#include <read_write_lock.hpp>
Public Member Functions | |
ReadWriteLock () | |
Constructor. | |
~ReadWriteLock () | |
Destructor. | |
void | lockRead () |
Locks for readers. Multiple readers can lock without blocking each other. | |
void | unlockRead () |
Unlocks for readers. | |
void | lockWrite () |
void | unlockWrite () |
Unlocks for writes. | |
Implements a read-write lock.
This is a mutex optimized for cases where we almost always have readers locking a data structure, but very rarely writers. On Linux, this is implemented with pthread rw lock.
Definition at line 35 of file read_write_lock.hpp.
void MaliSDK::ReadWriteLock::lockWrite | ( | ) |
Locks for writes. Only one writer (and no readers) can be inside critical regions at the same time.