libcmutils 0.6.5
Multi-platform C99 utility library
Loading...
Searching...
No Matches

Platform independent read/write lock object. More...

Data Fields

void(* ReadLock )(CMUTIL_RWLock *rwlock)
 Read lock for this object.
 
void(* ReadUnlock )(CMUTIL_RWLock *rwlock)
 Release read lock for this object.
 
void(* WriteLock )(CMUTIL_RWLock *rwlock)
 Write lock for this object.
 
void(* WriteUnlock )(CMUTIL_RWLock *rwlock)
 Release write lock for this object.
 
void(* Destroy )(CMUTIL_RWLock *rwlock)
 Destroy all resources related to this object.
 

Detailed Description

Platform independent read/write lock object.

Field Documentation

◆ ReadLock

void(* CMUTIL_RWLock::ReadLock) (CMUTIL_RWLock *rwlock)

Read lock for this object.

This method shall apply a read lock to the given object. The calling thread acquires the read lock if a writer does not hold the lock and there are no writers blocked on the lock.

Parameters
rwlockThis read-write lock object.

◆ ReadUnlock

void(* CMUTIL_RWLock::ReadUnlock) (CMUTIL_RWLock *rwlock)

Release read lock for this object.

This method shall release a read lock held on the given object.

Parameters
rwlockThis read-write lock object.

◆ WriteLock

void(* CMUTIL_RWLock::WriteLock) (CMUTIL_RWLock *rwlock)

Write lock for this object.

This method shall apply a write lock to the given object. The calling thread acquires the write lock if no other thread (reader or writer) holds the given object. Otherwise, the thread shall block until it can acquire the lock. The calling thread may deadlock if at the time the call is made it holds the read-write lock (whether a read or write lock).

Parameters
rwlockThis read-write lock object.

◆ WriteUnlock

void(* CMUTIL_RWLock::WriteUnlock) (CMUTIL_RWLock *rwlock)

Release write lock for this object.

This method shall release a write lock held on the given object.

Parameters
rwlockThis read-write lock object.

◆ Destroy

void(* CMUTIL_RWLock::Destroy) (CMUTIL_RWLock *rwlock)

Destroy all resources related to this object.

Parameters
rwlockThis read-write lock object.

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