ECCE @ EIC Software
 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 
12 {
13  pthread_mutex_destroy(&M);
14 }
15 
16 
17 
18 
20 {
21  return pthread_mutex_lock(&M);
22 }
23 
25 {
26  return pthread_mutex_trylock(&M);
27 }
28 
30 {
31  return pthread_mutex_unlock(&M);
32 }
33