X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=impatomic.cc;h=c10c43e596682a960896f1cef7380e1dea5de9f7;hb=09c3eb5539455e82dcb357fbce82bf5974c3a37c;hp=65b42fe558786052ab24efdd4f7a0d26970f012a;hpb=e60d8c23d30a0dfe66b8426f7f2ecf576e812028;p=model-checker.git diff --git a/impatomic.cc b/impatomic.cc index 65b42fe..c10c43e 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; } @@ -26,11 +25,6 @@ void atomic_flag_clear_explicit void atomic_flag_clear( volatile atomic_flag* __a__ ) { atomic_flag_clear_explicit( __a__, memory_order_seq_cst ); } -void atomic_flag_fence( const volatile atomic_flag* __a__, memory_order __x__ ) -{ - ASSERT(0); -} - void __atomic_flag_wait__( volatile atomic_flag* __a__ ) { while ( atomic_flag_test_and_set( __a__ ) ); }