threads_internal: add 'thread_switch_to_master()' internally
[model-checker.git] / libatomic.cc
index a00838e91545b823dfddeca4ef53b7b2c575b826..daf058a916091e75551a056bc38092323a6b9527 100644 (file)
@@ -1,13 +1,13 @@
 #include "libatomic.h"
-#include "libthreads.h"
+#include "threads_internal.h"
 
 void atomic_store_explicit(struct atomic_object *obj, int value, memory_order order)
 {
-       thread_yield();
+       thread_switch_to_master();
 }
 
 int atomic_load_explicit(struct atomic_object *obj, memory_order order)
 {
-       thread_yield();
+       thread_switch_to_master();
        return 0;
 }