This class provides a full specialization of RecursiveMutexImpl for pthreads. If the pthreads implementation supports the "recursive" attribute, then the native implementation is used, otherwise, a portable, efficient implementation is provided.
Synopsis
Declared in <bslmt_recursivemuteximpl_pthread.h>
template<>
class RecursiveMutexImpl<Platform::PosixThreads>;
Member Functions
Name |
Description |
|
Create a recursive mutex initialized to an unlocked state. This method does not return normally unless there are sufficient system resources to construct the object. |
|
Destroy this recursive mutex object. |
Acquire a lock on this mutex object. If this object is currently locked by a different thread, then suspend execution of the current thread until a lock can be acquired. Otherwise, if it unlocked, or locked by the calling thread, then grant ownership of the lock immediately and return. Note that when this object is recursively locked by a thread, |
|
Attempt to acquire a lock on this mutex object. If this object is unlocked, or locked by the calling thread, then grant ownership of the lock immediately and return 0. Otherwise If this object is currently locked by a different thread or if an error occurs, then return a non‐zero value. Note that when this object is recursively locked by a thread, |
|
Release a lock on this mutex that was previously acquired through a successful call to |
Created with MrDocs