8#ifndef INCLUDED_BSLMT_READERWRITERLOCK
9#define INCLUDED_BSLMT_READERWRITERLOCK
275#include <bslscm_version.h>
299 e_WRITE_SIGNALED = 1,
300 e_UPGRADE_SIGNALED = 2
306 static const unsigned long long WRITER_MASK = 0x000000000000FFFFLL;
309 static const unsigned long long READER_MASK = 0x00000000FFFF0000LL;
312 static const unsigned long long READER_INC = 0x0000000000010000LL;
315 static const unsigned long long BLOCKED_READER_MASK = 0x0000FFFF00000000LL;
318 static const unsigned long long BLOCKED_READER_INC = 0x00000000100000000LL;
322 static const unsigned long long READ_OK = 0x0001000000000000LL;
326 static const unsigned long long UPGRADE_PENDING = 0x0002000000000000LL;
329 static const unsigned long long RESERVATION_PENDING = 0x0004000000000000LL;
332 static const unsigned long long READ_BCAST_MASK = 0xFFF0000000000000LL;
335 static const unsigned long long READ_BCAST_INC = 0x0010000000000000LL;
338 bsls::AtomicOperations::AtomicTypes::Int64 d_rwCount;
357 SignalState d_signalState;
475: d_signalState(e_NOT_SIGNALED)
511 if (rwcount & (READER_MASK|WRITER_MASK)) {
524 if (rwcount & READER_MASK) {
537 if (rwcount & WRITER_MASK) {
Definition bslmt_condition.h:220
Definition bslmt_mutex.h:315
Definition bslmt_readerwriterlock.h:294
int tryUpgradeToWriteLock()
~ReaderWriterLock()
Destroy this reader/writer lock.
Definition bslmt_readerwriterlock.h:482
void unlockReadUnreserveWrite()
Definition bslmt_readerwriterlock.h:494
void lockReadReserveWrite()
ReaderWriterLock()
Construct a reader/writer lock initialized to an unlocked state.
Definition bslmt_readerwriterlock.h:474
bool isLockedWrite() const
Definition bslmt_readerwriterlock.h:533
bool isLocked() const
Definition bslmt_readerwriterlock.h:507
bool isLockedRead() const
Definition bslmt_readerwriterlock.h:520
void unlockRead()
Definition bslmt_readerwriterlock.h:488
void unlockWrite()
Definition bslmt_readerwriterlock.h:500
Definition bsls_atomic.h:1472
Definition bsls_atomic.h:1195
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bslmt_barrier.h:344
static void initInt64(AtomicTypes::Int64 *atomicInt, Types::Int64 initialValue=0)
Definition bsls_atomicoperations.h:1721
static Types::Int64 getInt64(AtomicTypes::Int64 const *atomicInt)
Definition bsls_atomicoperations.h:1701
long long Int64
Definition bsls_types.h:132