[#BloombergLP-bslmt-RWMutexImpl-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/RWMutexImpl-0d.adoc[RWMutexImpl]&lt;xref:BloombergLP/bslmt/Platform/PosixThreads.adoc[Platform::PosixThreads]&gt;
:relfileprefix: ../../
:mrdocs:

Platform&hyphen;specific readers&hyphen;writer mutex implementation for POSIX threads&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;rwmutex&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
struct xref:BloombergLP/bslmt/RWMutexImpl-0d.adoc[RWMutexImpl]&lt;xref:BloombergLP/bslmt/Platform/PosixThreads.adoc[Platform::PosixThreads]&gt;;
----

== Description

This is a platform&hyphen;specific implementation detail that is not intended for use outside of this component&period; Use the `RWMutex` class instead&period; 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)&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/RWMutexImpl-0e/2constructor.adoc[`RWMutexImpl`]         [.small]#[constructor]#
| Create a readers&hyphen;writer mutex initialized to an unlocked state&period;
| xref:BloombergLP/bslmt/RWMutexImpl-0e/2destructor.adoc[`&#126;RWMutexImpl`] [.small]#[destructor]#
| Destroy this readers&hyphen;writer mutex&period; The behavior is undefined if the mutex is in a locked state&period;
| xref:BloombergLP/bslmt/RWMutexImpl-0e/lockRead.adoc[`lockRead`] 
| Lock this readers&hyphen;writer mutex for reading&period;
| xref:BloombergLP/bslmt/RWMutexImpl-0e/lockWrite.adoc[`lockWrite`] 
| Lock this readers&hyphen;writer mutex for writing&period;
| xref:BloombergLP/bslmt/RWMutexImpl-0e/tryLockRead.adoc[`tryLockRead`] 
| Attempt to lock this readers&hyphen;writer mutex for reading&period;
| xref:BloombergLP/bslmt/RWMutexImpl-0e/tryLockWrite.adoc[`tryLockWrite`] 
| Attempt to lock this readers&hyphen;writer mutex for writing&period;
| xref:BloombergLP/bslmt/RWMutexImpl-0e/unlock.adoc[`unlock`] 
| Release the lock held by the calling thread on this mutex&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
