Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TWin32Mutex.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/thread:$Id$
0002 // Author: Bertrand Bellenot  20/10/2004
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TWin32Mutex
0013 #define ROOT_TWin32Mutex
0014 
0015 
0016 //////////////////////////////////////////////////////////////////////////
0017 //                                                                      //
0018 // TWin32Mutex                                                          //
0019 //                                                                      //
0020 // This class provides an interface to the Win32 mutex routines.        //
0021 //                                                                      //
0022 //////////////////////////////////////////////////////////////////////////
0023 
0024 #include "TMutexImp.h"
0025 
0026 #include "Windows4Root.h"
0027 
0028 class TWin32Mutex : public TMutexImp {
0029 
0030 friend class TWin32Condition;
0031 
0032 private:
0033    CRITICAL_SECTION fCritSect;
0034 
0035    enum EStatusBits { kIsRecursive = BIT(14) };
0036 
0037 public:
0038    TWin32Mutex(Bool_t recursive=kFALSE);
0039    virtual ~TWin32Mutex();
0040 
0041    Int_t  Lock() override;
0042    Int_t  UnLock() override;
0043    Int_t  TryLock() override;
0044 
0045    ClassDefOverride(TWin32Mutex,0)  // Win32 mutex lock
0046 };
0047 
0048 #endif