class readwritelock : public abstractsemaphore Class to store a read/write lock.
| | readwritelock (int Maxuse = -1) Default constructor. |
| | ~readwritelock () Default destructor. |
| | readwritelock (const readwritelock& rw) Copy constructor. |
| | operator= (const readwritelock&) Assignment operator. |
| | readlock () Read/write-lock lock function. |
| | writelock () Read/write-lock lock function. |
| | lock () Read/write-lock lock function. |
| | unlock () Read/write-lock unlock function. |
| | trylock (locktype lck = rdlock) Read/write-lock trylock function. |
This class is used to implement a read/write lock. A read/write lock can be locked by multple readers simultaneously. A writer owns the lock exclusively. The maximum number of readers can be specified during creation. Writers have priority over readers, meaning if a request from a writer is pending, no further read access is granted. Then, after all readers have returned the lock, the writer will get granted access first. When passing a read/write lock object to a function it has to be passed by reference or by pointer (never by value because the copy operator is disabled for read/write locks).
virtual ~readwritelock()
readwritelock(const readwritelock& rw)
readwritelock& operator= (const readwritelock&)
virtual void readlock()
virtual void writelock()
virtual void lock()
virtual void unlock()
bool trylock(locktype lck = rdlock)
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++