Change initialize a bit
[c11tester.git] / conditionvariable.cc
index 75af879ff63cf53e2c5675e6bc6a120f67d06782..9d569e974406dc56831387c4f55e5321151d2739 100644 (file)
@@ -1,28 +1,28 @@
-#include <mutex>
+#include "mutex.h"
 #include "model.h"
 #include <condition_variable>
 #include "action.h"
 
-namespace std {
+namespace cdsc {
 
 condition_variable::condition_variable() {
-               
+
 }
 
 condition_variable::~condition_variable() {
-               
+
 }
 
 void condition_variable::notify_one() {
-       model->switch_to_master(new ModelAction(ATOMIC_NOTIFY_ONE, std::memory_order_seq_cst, this));
+       model->switch_thread(new ModelAction(ATOMIC_NOTIFY_ONE, std::memory_order_seq_cst, this));
 }
 
 void condition_variable::notify_all() {
-       model->switch_to_master(new ModelAction(ATOMIC_NOTIFY_ALL, std::memory_order_seq_cst, this));
+       model->switch_thread(new ModelAction(ATOMIC_NOTIFY_ALL, std::memory_order_seq_cst, this));
 }
 
 void condition_variable::wait(mutex& lock) {
-       model->switch_to_master(new ModelAction(ATOMIC_WAIT, std::memory_order_seq_cst, this, (uint64_t) &lock));
+       model->switch_thread(new ModelAction(ATOMIC_WAIT, std::memory_order_seq_cst, this, (uint64_t) &lock));
        //relock as a second action
        lock.lock();
 }