|
libcmutils 0.6.5
Multi-platform C99 utility library
|
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. | |
Platform independent read/write lock object.
| 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.
| rwlock | This read-write lock object. |
| 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.
| rwlock | This read-write lock object. |
| 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).
| rwlock | This read-write lock object. |
| 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.
| rwlock | This read-write lock object. |
| void(* CMUTIL_RWLock::Destroy) (CMUTIL_RWLock *rwlock) |
Destroy all resources related to this object.
| rwlock | This read-write lock object. |