Simpact Cyan
Population based event driven simulation using mNRM
Main Page
Classes
Files
File List
File Members
src
lib
util
mutex.h
1
#ifndef MUTEX_H
2
3
#define MUTEX_H
4
5
#ifndef DISABLEOPENMP
6
7
#include <omp.h>
8
9
class
Mutex
10
{
11
public
:
12
Mutex();
13
~Mutex();
14
15
void
lock() { omp_set_lock(&m_lock); }
16
void
unlock() { omp_unset_lock(&m_lock); }
17
private
:
18
omp_lock_t m_lock;
19
};
20
21
#else
22
23
class
Mutex
24
{
25
public
:
26
Mutex() { }
27
~Mutex() { }
28
29
void
lock() { }
30
void
unlock() { }
31
};
32
33
#endif // !DISABLEOPENMP
34
35
#endif // MUTEX_H
Generated on Wed Nov 16 2016 09:03:20 for Simpact Cyan by
1.8.6