Platform‐specific readers‐writer mutex implementation for POSIX threads.

Synopsis

Declared in <bslmt_rwmutex.h>

template<>
struct RWMutexImpl<Platform::PosixThreads>;

Description

This is a platform‐specific implementation detail that is not intended for use outside of this component. Use the RWMutex class instead. This structure is a wrapper around a POSIX RW lock on Sun (on AIX the POSIX RW lock has poor performance and no writer guarantees).

Member Functions

Name

Description

RWMutexImpl [constructor]

Create a readers‐writer mutex initialized to an unlocked state.

~RWMutexImpl [destructor]

Destroy this readers‐writer mutex. The behavior is undefined if the mutex is in a locked state.

lockRead

Lock this readers‐writer mutex for reading.

lockWrite

Lock this readers‐writer mutex for writing.

tryLockRead

Attempt to lock this readers‐writer mutex for reading.

tryLockWrite

Attempt to lock this readers‐writer mutex for writing.

unlock

Release the lock held by the calling thread on this mutex.

Created with MrDocs