ROOT logo
// @(#)root/thread:$Id$
// Author: Fons Rademakers   25/06/97

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TPosixMutex
#define ROOT_TPosixMutex


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TPosixMutex                                                          //
//                                                                      //
// This class provides an interface to the posix mutex routines.        //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TMutexImp
#include "TMutexImp.h"
#endif

#ifndef __CINT__
#include <pthread.h>
#else
struct pthread_mutex_t;
#endif

class TPosixMutex : public TMutexImp {

friend class TPosixCondition;

private:
   pthread_mutex_t  fMutex;   // the pthread mutex

public:
   TPosixMutex(Bool_t recursive=kFALSE);
   virtual ~TPosixMutex();

   Int_t  Lock();
   Int_t  UnLock();
   Int_t  TryLock();

   ClassDef(TPosixMutex,0)  // Posix mutex lock
};

#endif
 TPosixMutex.h:1
 TPosixMutex.h:2
 TPosixMutex.h:3
 TPosixMutex.h:4
 TPosixMutex.h:5
 TPosixMutex.h:6
 TPosixMutex.h:7
 TPosixMutex.h:8
 TPosixMutex.h:9
 TPosixMutex.h:10
 TPosixMutex.h:11
 TPosixMutex.h:12
 TPosixMutex.h:13
 TPosixMutex.h:14
 TPosixMutex.h:15
 TPosixMutex.h:16
 TPosixMutex.h:17
 TPosixMutex.h:18
 TPosixMutex.h:19
 TPosixMutex.h:20
 TPosixMutex.h:21
 TPosixMutex.h:22
 TPosixMutex.h:23
 TPosixMutex.h:24
 TPosixMutex.h:25
 TPosixMutex.h:26
 TPosixMutex.h:27
 TPosixMutex.h:28
 TPosixMutex.h:29
 TPosixMutex.h:30
 TPosixMutex.h:31
 TPosixMutex.h:32
 TPosixMutex.h:33
 TPosixMutex.h:34
 TPosixMutex.h:35
 TPosixMutex.h:36
 TPosixMutex.h:37
 TPosixMutex.h:38
 TPosixMutex.h:39
 TPosixMutex.h:40
 TPosixMutex.h:41
 TPosixMutex.h:42
 TPosixMutex.h:43
 TPosixMutex.h:44
 TPosixMutex.h:45
 TPosixMutex.h:46
 TPosixMutex.h:47
 TPosixMutex.h:48
 TPosixMutex.h:49
 TPosixMutex.h:50
 TPosixMutex.h:51
 TPosixMutex.h:52