ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
TPosixMutex.h
Go to the documentation of this file.
1
// @(#)root/thread:$Id$
2
// Author: Fons Rademakers 25/06/97
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TPosixMutex
13
#define ROOT_TPosixMutex
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TPosixMutex //
19
// //
20
// This class provides an interface to the posix mutex routines. //
21
// //
22
//////////////////////////////////////////////////////////////////////////
23
24
#include "
TMutexImp.h
"
25
26
#ifndef __CINT__
27
#include <pthread.h>
28
#else
29
struct
pthread_mutex_t;
30
#endif
31
32
class
TPosixMutex :
public
TMutexImp {
33
34
friend
class
TPosixCondition;
35
36
private
:
37
pthread_mutex_t fMutex;
// the pthread mutex
38
39
constexpr
static
int
kIsRecursive = BIT(14);
40
41
public
:
42
TPosixMutex(Bool_t recursive=kFALSE);
43
virtual
~TPosixMutex();
44
45
Int_t Lock();
46
Int_t UnLock();
47
Int_t TryLock();
48
49
ClassDef(TPosixMutex,0)
// Posix mutex lock
50
};
51
52
#endif
TMutexImp.h
core
thread
inc
TPosixMutex.h
Generated on Tue May 5 2020 14:02:26 for ROOT by
1.8.5