X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=impatomic.cc;h=c10c43e596682a960896f1cef7380e1dea5de9f7;hb=b1de3c01aaea4141cd01410ef739a00f2987b567;hp=571789d662f154e109025e23c6d09ac89f998692;hpb=cc2accafaceffae9593b64b9f526d6c8d6239bd4;p=c11tester.git diff --git a/impatomic.cc b/impatomic.cc index 571789d6..c10c43e5 100644 --- a/impatomic.cc +++ b/impatomic.cc @@ -7,8 +7,7 @@ namespace std { bool atomic_flag_test_and_set_explicit ( volatile atomic_flag * __a__, memory_order __x__ ) { volatile bool * __p__ = &((__a__)->__f__); - model->switch_to_master(new ModelAction(ATOMIC_RMWR, __x__, (void *) __p__)); - bool result = (bool) thread_current()->get_return_value(); + bool result = (bool) model->switch_to_master(new ModelAction(ATOMIC_RMWR, __x__, (void *) __p__)); model->switch_to_master(new ModelAction(ATOMIC_RMW, __x__, (void *) __p__, true)); return result; }