Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWFIFOMutexLock

Module:  Threads   Package:  Synchronization


RWFIFOMutexLock RWSynchObject

Local Index

Members

Header File

#include <rw/sync/RWFIFOMutexLock.h>

Description

An RWFIFOMutexLock can be used to guarantee that blocking threads will acquire the mutex in the same order that they called the acquire() member function. On certain systems, thread attributes such as thread priority may be a factor in determining the order in which threads blocking on the same mutex will acquire that mutex when it is finally released. Class RWFIFOMutexLock eliminates those other factors and considers only the order of requests for acquisition.

Example

Member Typedefs

typedef RWTLockGuard<RWFIFOMutexLock>       LockGuard;
typedef RWTLockGuard<RWFIFOMutexLock>       ReadLockGuard;
typedef RWTLockGuard<RWFIFOMutexLock>       WriteLockGuard;
typedef RWTTryLockGuard<RWFIFOMutexLock>    TryLockGuard;
typedef RWTTryLockGuard<RWFIFOMutexLock>    TryReadLockGuard;
typedef RWTTryLockGuard<RWFIFOMutexLock>    TryWriteLockGuard;
typedef RWTUnlockGuard<RWFIFOMutexLock>     UnlockGuard;
typedef RWTUnlockGuard<RWFIFOMutexLock>     ReadUnlockGuard;
typedef RWTUnlockGuard<RWFIFOMutexLock>     WriteUnlockGuard;

Public Constructors

RWFIFOMutexLock(RWCancellationState
                state=RW_CANCELLATION_DISABLED);
RWFIFOMutexLock(RWStaticCtor);

Public Destructor

~RWFIFOMutexLock();

Public Member Functions

void
acquire();
RWWaitStatus 
acquire(unsigned long milliseconds);
void 
acquireRead();
RWWaitStatus 
acquireRead(unsigned long milliseconds);
void 
acquireWrite();
RWWaitStatus 
acquireWrite(unsigned long milliseconds);
bool
isAcquired() const;

NOTE -- Only available from the debug version of the module.
void 
release();
bool 
tryAcquire();
bool 
tryAcquireRead();
bool 
tryAcquireWrite();

Private Constructor

RWFIFOMutexLock(const RWFIFOMutexLock& second);

Private Member Operator

RWFIFOMutexLock&
operator=(const RWFIFOMutexLock& second);

See Also

RWMutexLock, RWTRecursiveLock<Mutex>



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.