support for locks... untested, but doesn't break quick run of a sample of test cases
[model-checker.git] / mutex.h
1 #ifndef MUTEX_H
2 #define MUTEX_H
3 #include "threads.h"
4
5 namespace std {
6         struct mutex_state {
7                 bool islocked;
8         };
9
10         class mutex {
11         public:
12                 mutex();
13                 ~mutex();
14                 void lock();
15                 bool try_lock();
16                 void unlock();
17                 struct mutex_state * get_state() {return &state;}
18                 
19         private:
20                 struct mutex_state state;
21         };
22 }
23 #endif