projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: use get_write_value()
[model-checker.git]
/
mutex.cc
diff --git
a/mutex.cc
b/mutex.cc
index 6ef297a594d6b897110e7663c1f3753f859e0c3a..145000548be4665f7f8a2cfb4fb657c2ab9a5382 100644
(file)
--- a/
mutex.cc
+++ b/
mutex.cc
@@
-1,7
+1,9
@@
-#include "mutex.h"
+#include <mutex>
+
#include "model.h"
#include "model.h"
-#include "threads.h"
+#include "threads
-model
.h"
#include "clockvector.h"
#include "clockvector.h"
+#include "action.h"
namespace std {
mutex::mutex() {
namespace std {
mutex::mutex() {
@@
-16,8
+18,7
@@
void mutex::lock() {
}
bool mutex::try_lock() {
}
bool mutex::try_lock() {
- model->switch_to_master(new ModelAction(ATOMIC_TRYLOCK, std::memory_order_seq_cst, this));
- return thread_current()->get_return_value();
+ return model->switch_to_master(new ModelAction(ATOMIC_TRYLOCK, std::memory_order_seq_cst, this));
}
void mutex::unlock() {
}
void mutex::unlock() {