library: libThread
#include "TRWLock.h"

TRWLock


class description - header file - source file - inheritance tree (.pdf)

class TRWLock : public TObject

Inheritance Chart:
TObject
<-
TRWLock

    public:
TRWLock() TRWLock(const TRWLock& l) 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()

Data Members

    private:
Int_t fReaders number of readers Int_t fWriters number of writers TMutex fMutex rwlock mutex TCondition fLockFree rwlock condition variable

Class Description

                                                                      
 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()
 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.
TRWLock()
TRWLock& operator=(const TRWLock&)
virtual ~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.