Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
if (now >= wakeup) {
break;
}
- sleep(wakeup - now);
+ xsleep(wakeup - now);
}
}
last_restart = time(NULL);
#include "bitmap.h"
#include "byte-order.h"
#include "coverage.h"
+#include "ovs-rcu.h"
#include "ovs-thread.h"
#include "vlog.h"
#ifdef HAVE_PTHREAD_SET_NAME_NP
return ok;
}
+unsigned int
+xsleep(unsigned int seconds)
+{
+ unsigned int t;
+
+ ovsrcu_quiesce_start();
+ t = sleep(seconds);
+ ovsrcu_quiesce_end();
+ return t;
+}
+
#ifdef _WIN32
\f
char *
char *ovs_lasterror_to_string(void);
int ftruncate(int fd, off_t length);
#endif
+unsigned int xsleep(unsigned int seconds);
#ifdef __cplusplus
}