4 bool atomic_flag_test_and_set_explicit
5 ( volatile atomic_flag* __a__, memory_order __x__ )
7 bool * __p__ = &((__a__)->__f__);
8 model->switch_to_master(new ModelAction(ATOMIC_READ, __x__, __p__));
9 bool result = (void *) thread_current()->get_return_value();
10 model->switch_to_master(new ModelAction(ATOMIC_RMW, __x__, __p__, true));
14 bool atomic_flag_test_and_set( volatile atomic_flag* __a__ )
15 { return atomic_flag_test_and_set_explicit( __a__, memory_order_seq_cst ); }
17 void atomic_flag_clear_explicit
18 ( volatile atomic_flag* __a__, memory_order __x__ )
20 bool * __p__ = &((__a__)->__f__);
21 model->switch_to_master(new ModelAction(ATOMIC_WRITE, __x__, __p__, false));
24 void atomic_flag_clear( volatile atomic_flag* __a__ )
25 { atomic_flag_clear_explicit( __a__, memory_order_seq_cst ); }
27 void atomic_flag_fence( const volatile atomic_flag* __a__, memory_order __x__ )
32 void __atomic_flag_wait__( volatile atomic_flag* __a__ )
33 { while ( atomic_flag_test_and_set( __a__ ) ); }
35 void __atomic_flag_wait_explicit__( volatile atomic_flag* __a__,
37 { while ( atomic_flag_test_and_set_explicit( __a__, __x__ ) ); }