X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cmodelint.cc;h=4754a826800ab3cee4d6d32baf152905fb3d2d70;hb=84e24d516d4e9dbd30f1fff7e9a185d1540d20eb;hp=20f257c3b28df24edffd12c716bddd9311d177fd;hpb=9fc455aa88e0fe0415081e282bd1bda4c633fa8f;p=model-checker.git diff --git a/cmodelint.cc b/cmodelint.cc index 20f257c..4754a82 100644 --- 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)); } +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_rmwc_action(void *obj, memory_order ord) { + model->switch_to_master(new ModelAction(ATOMIC_RMWC, ord, obj)); +}