remove some datarace code
[c11tester.git] / sleeps.cc
1 #include <time.h>
2 #include <unistd.h>
3
4 #include "action.h"
5 #include "model.h"
6
7 unsigned int __sleep (unsigned int seconds)
8 {
9         model->switch_to_master(
10                 new ModelAction(NOOP, std::memory_order_seq_cst, NULL)
11                 );
12         return 0;
13 }
14
15 unsigned int sleep(unsigned int seconds)
16 {
17         return __sleep(seconds);
18 }
19
20 int usleep (useconds_t useconds)
21 {
22         model->switch_to_master(
23                 new ModelAction(NOOP, std::memory_order_seq_cst, NULL)
24                 );
25         return 0;
26 }