projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rmw example works
[model-checker.git]
/
cmodelint.cc
diff --git
a/cmodelint.cc
b/cmodelint.cc
index 20f257c3b28df24edffd12c716bddd9311d177fd..4754a826800ab3cee4d6d32baf152905fb3d2d70 100644
(file)
--- a/
cmodelint.cc
+++ b/
cmodelint.cc
@@
-14,6
+14,15
@@
void model_init_action(void * obj, uint64_t val) {
model->switch_to_master(new ModelAction(ATOMIC_INIT, memory_order_relaxed, obj, val));
}
model->switch_to_master(new ModelAction(ATOMIC_INIT, memory_order_relaxed, obj, val));
}
+uint64_t model_rmwr_action(void *obj, memory_order ord) {
+ model->switch_to_master(new ModelAction(ATOMIC_RMWR, ord, obj));
+ return thread_current()->get_return_value();
+}
+
void model_rmw_action(void *obj, memory_order ord, uint64_t val) {
model->switch_to_master(new ModelAction(ATOMIC_RMW, ord, obj, val));
}
void model_rmw_action(void *obj, memory_order ord, uint64_t val) {
model->switch_to_master(new ModelAction(ATOMIC_RMW, ord, obj, val));
}
+
+void model_rmwc_action(void *obj, memory_order ord) {
+ model->switch_to_master(new ModelAction(ATOMIC_RMWC, ord, obj));
+}