.TH "ost::ThreadLock" 3 "Sun Dec 27 2020" "GNU CommonC++" \" -*- nroff -*- .ad l .nh .SH NAME ost::ThreadLock \- The \fBThreadLock\fP class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBThreadLock\fP ()" .br .RI "Create a process shared thread lock object\&. " .ti -1c .RI "virtual \fB~ThreadLock\fP ()" .br .RI "Destroy a process shared thread lock object\&. " .ti -1c .RI "void \fBreadLock\fP (void)" .br .RI "Aquire a read lock for the current object\&. " .ti -1c .RI "void \fBwriteLock\fP (void)" .br .RI "Aquire a write lock for the current object\&. " .ti -1c .RI "bool \fBtryReadLock\fP (void)" .br .RI "Attempt read lock for current object\&. " .ti -1c .RI "bool \fBtryWriteLock\fP (void)" .br .RI "Attempt write lock for current object\&. " .ti -1c .RI "void \fBunlock\fP (void)" .br .RI "Release any held locks\&. " .in -1c .SH "Detailed Description" .PP The \fBThreadLock\fP class impliments a thread rwlock for optimal reader performance on systems which have rwlock support, and reverts to a simple mutex for those that do not\&. .PP \fBAuthor\fP .RS 4 David Sugar dyfet@ostel.com .RE .PP Posix rwlock extension for protected access\&. .SH "Constructor & Destructor Documentation" .PP .SS "ost::ThreadLock::ThreadLock ()" .PP Create a process shared thread lock object\&. .SS "virtual ost::ThreadLock::~ThreadLock ()\fC [virtual]\fP" .PP Destroy a process shared thread lock object\&. .SH "Member Function Documentation" .PP .SS "void ost::ThreadLock::readLock (void)" .PP Aquire a read lock for the current object\&. .PP Referenced by ost::ReadLock::ReadLock()\&. .SS "bool ost::ThreadLock::tryReadLock (void)" .PP Attempt read lock for current object\&. .PP \fBReturns\fP .RS 4 true on success\&. .RE .PP .SS "bool ost::ThreadLock::tryWriteLock (void)" .PP Attempt write lock for current object\&. .PP \fBReturns\fP .RS 4 true on success\&. .RE .PP .SS "void ost::ThreadLock::unlock (void)" .PP Release any held locks\&. .PP Referenced by ost::ReadLock::~ReadLock(), and ost::WriteLock::~WriteLock()\&. .SS "void ost::ThreadLock::writeLock (void)" .PP Aquire a write lock for the current object\&. .PP Referenced by ost::WriteLock::WriteLock()\&. .SH "Author" .PP Generated automatically by Doxygen for GNU CommonC++ from the source code\&.