00001 // @(#)root/thread:$Id: TWin32Mutex.h 29797 2009-08-17 14:35:51Z rdm $ 00002 // Author: Bertrand Bellenot 20/10/2004 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, 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_TWin32Mutex 00013 #define ROOT_TWin32Mutex 00014 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // TWin32Mutex // 00019 // // 00020 // This class provides an interface to the Win32 mutex routines. // 00021 // // 00022 ////////////////////////////////////////////////////////////////////////// 00023 00024 #ifndef ROOT_TMutexImp 00025 #include "TMutexImp.h" 00026 #endif 00027 00028 #include "Windows4Root.h" 00029 00030 #ifdef __CINT__ 00031 struct CRITICAL_SECTION; 00032 #endif 00033 00034 class TWin32Mutex : public TMutexImp { 00035 00036 friend class TWin32Condition; 00037 00038 private: 00039 CRITICAL_SECTION fCritSect; 00040 00041 public: 00042 TWin32Mutex(Bool_t recursive=kFALSE); 00043 virtual ~TWin32Mutex(); 00044 00045 Int_t Lock(); 00046 Int_t UnLock(); 00047 Int_t TryLock(); 00048 00049 ClassDef(TWin32Mutex,0) // Win32 mutex lock 00050 }; 00051 00052 #endif