TPosixMutex.h

Go to the documentation of this file.
00001 // @(#)root/thread:$Id: TPosixMutex.h 29797 2009-08-17 14:35:51Z rdm $
00002 // Author: Fons Rademakers   25/06/97
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TPosixMutex
00013 #define ROOT_TPosixMutex
00014 
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TPosixMutex                                                          //
00019 //                                                                      //
00020 // This class provides an interface to the posix mutex routines.        //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TMutexImp
00025 #include "TMutexImp.h"
00026 #endif
00027 
00028 #ifndef __CINT__
00029 #include <pthread.h>
00030 #else
00031 struct pthread_mutex_t;
00032 #endif
00033 
00034 class TPosixMutex : public TMutexImp {
00035 
00036 friend class TPosixCondition;
00037 
00038 private:
00039    pthread_mutex_t  fMutex;   // the pthread mutex
00040 
00041 public:
00042    TPosixMutex(Bool_t recursive=kFALSE);
00043    virtual ~TPosixMutex();
00044 
00045    Int_t  Lock();
00046    Int_t  UnLock();
00047    Int_t  TryLock();
00048 
00049    ClassDef(TPosixMutex,0)  // Posix mutex lock
00050 };
00051 
00052 #endif

Generated on Tue Jul 5 14:11:59 2011 for ROOT_528-00b_version by  doxygen 1.5.1