Vulkan SDK for Android 1.1.1 Mali Developer Center
All Classes Functions Variables Enumerations Enumerator Pages
MaliSDK::ReadWriteLock Class Reference

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.
 

Detailed Description

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.

Member Function Documentation

◆ lockWrite()

void MaliSDK::ReadWriteLock::lockWrite ( )

Locks for writes. Only one writer (and no readers) can be inside critical regions at the same time.


The documentation for this class was generated from the following file: