TRWLock
class description - source file - inheritance tree (.pdf)
public:
TRWLock()
TRWLock(const TRWLock&)
virtual ~TRWLock()
static TClass* Class()
virtual TClass* IsA() const
TRWLock& operator=(const TRWLock&)
Int_t ReadLock()
Int_t ReadUnLock()
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Int_t WriteLock()
Int_t WriteUnLock()
private:
Int_t fReaders number of readers
Int_t fWriters number of writers
TMutex fMutex rwlock mutex
TCondition fLockFree rwlock condition variable
TRWLock
This class implements a reader/writer lock. A rwlock allows
a resource to be accessed by multiple reader threads but only
one writer thread.
TRWLock() : fLockFree(&fMutex)
Create reader/write lock.
Int_t ReadLock()
Obtain a reader lock. Returns always 0.
Int_t ReadUnLock()
Unlock reader lock. Returns -1 if thread was not locked,
0 if everything ok.
Int_t WriteLock()
Obtain a writer lock. Returns always 0.
Int_t WriteUnLock()
Unlock writer lock. Returns -1 if thread was not locked,
0 if everything ok.
Inline Functions
void ~TRWLock()
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TRWLock TRWLock(const TRWLock&)
TRWLock& operator=(const TRWLock&)
Author: Fons Rademakers 04/01/2000
Last update: root/thread:$Name: $:$Id: TRWLock.cxx,v 1.1.1.1 2000/05/16 17:00:48 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.