towards making rmw work...
[c11tester.git] / impatomic.cc
index 8642bee26c63011a112951d72a84bc1d7ed08bc6..df11202d8ade74f9e677bd8ebb46b2fc1bf062cd 100644 (file)
@@ -6,7 +6,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_READ, __x__, (void *) __p__));
+       model->switch_to_master(new ModelAction(ATOMIC_RMWR, __x__, (void *) __p__));
        bool result = (bool) thread_current()->get_return_value();
        model->switch_to_master(new ModelAction(ATOMIC_RMW, __x__, (void *) __p__, true));
        return result;