projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make linux_rw locks work again
[model-checker.git]
/
mutex.h
diff --git
a/mutex.h
b/mutex.h
index 1c6c3f3624fc1f9f31b4fa8331a756ea1eebee34..53fccb2b89a8974fb26ed8d60f4f1262d3c23396 100644
(file)
--- a/
mutex.h
+++ b/
mutex.h
@@
-1,8
+1,15
@@
#ifndef MUTEX_H
#define MUTEX_H
#ifndef MUTEX_H
#define MUTEX_H
-#include "threads.h"
+
+#include "modeltypes.h"
namespace std {
namespace std {
+ struct mutex_state {
+ bool islocked;
+ thread_id_t alloc_tid;
+ modelclock_t alloc_clock;
+ };
+
class mutex {
public:
mutex();
class mutex {
public:
mutex();
@@
-10,9
+17,10
@@
namespace std {
void lock();
bool try_lock();
void unlock();
void lock();
bool try_lock();
void unlock();
+ struct mutex_state * get_state() {return &state;}
+
private:
private:
- thread_id_t owner;
- bool islocked;
+ struct mutex_state state;
};
}
#endif
};
}
#endif