projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: debug print - pending release sequences
[model-checker.git]
/
mutex.h
diff --git
a/mutex.h
b/mutex.h
index 1c6c3f3624fc1f9f31b4fa8331a756ea1eebee34..828aae53f9e1d273900b776ab657907c87e3cd08 100644
(file)
--- a/
mutex.h
+++ b/
mutex.h
@@
-1,8
+1,15
@@
#ifndef MUTEX_H
#define MUTEX_H
#include "threads.h"
#ifndef MUTEX_H
#define MUTEX_H
#include "threads.h"
+#include "clockvector.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