Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWFIFOMutexLock


RWFIFOMutexLock RWSynchObject

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Data Types

Member Functions

Package

Synchronization

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 Constructor

RWFIFOMutexLock(RWCancellationState
                state=RW_CANCELLATION_DISABLED);

Public Destructor

~RWFIFOMutexLock();

Public Member Functions

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

NOTE: Only available from the debug version of the library.
void 
release(void);
RWBoolean 
tryAcquire(void);
RWBoolean 
tryAcquireRead(void);
RWBoolean 
tryAcquireWrite(void);

See Also

RWMutexLock, RWTRecursiveLock<Mutex>



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.