Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
pMutex.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file pMutex.cc
1
#include <
pMutex.h
>
2
3
pMutex::pMutex
(
const
int
lockstatus)
4
{
5
pthread_mutex_init(&
M
, 0);
6
7
if
(lockstatus) pthread_mutex_lock(&
M
);
8
9
}
10
11
pMutex::~pMutex
()
12
{
13
pthread_mutex_destroy(&
M
);
14
}
15
16
17
18
19
int
pMutex::Lock
()
20
{
21
return
pthread_mutex_lock(&
M
);
22
}
23
24
int
pMutex::tryLock
()
25
{
26
return
pthread_mutex_trylock(&
M
);
27
}
28
29
int
pMutex::Release
()
30
{
31
return
pthread_mutex_unlock(&
M
);
32
}
33
online_distribution
blob
master
pmonitor
pMutex.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:28
using
1.8.2 with
sPHENIX GitHub integration