X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=cmodelint.cc;h=fc80b299f0e590312b62a919926e41c30310e8db;hp=15d6151b9f1bc7b7030539e656ef209f19c6eb09;hb=f750120c93252f2b677c4b07d003fc71fcdaaa00;hpb=6cd88a53a1644573bb4f2d09dcccdfc488d3117b diff --git a/cmodelint.cc b/cmodelint.cc index 15d6151b..fc80b299 100644 --- a/cmodelint.cc +++ b/cmodelint.cc @@ -33,6 +33,15 @@ uint64_t model_rmwr_action(void *obj, memory_order ord) { return model->switch_to_master(new ModelAction(ATOMIC_RMWR, ord, obj)); } +/** + * Performs the read part of a RMW CAS action. The next action must + * either be the write part of the RMW action or an explicit close out + * of the RMW action w/o a write. + */ +uint64_t model_rmwrcas_action(void *obj, memory_order ord, uint64_t oldval, int size) { + return model->switch_to_master(new ModelAction(ATOMIC_RMWRCAS, ord, obj, oldval, size)); +} + /** Performs the write part of a RMW action. */ void model_rmw_action(void *obj, memory_order ord, uint64_t val) { model->switch_to_master(new ModelAction(ATOMIC_RMW, ord, obj, val));