#include "fatal-signal.h"
#include "hash.h"
#include "hmap.h"
+#include "ovs-rcu.h"
#include "ovs-thread.h"
#include "signals.h"
#include "seq.h"
time_left = timeout_when - now;
}
+ if (!time_left) {
+ ovsrcu_quiesce();
+ } else {
+ ovsrcu_quiesce_start();
+ }
+
#ifndef _WIN32
retval = poll(pollfds, n_pollfds, time_left);
if (retval < 0) {
}
#endif
+ if (time_left) {
+ ovsrcu_quiesce_end();
+ }
+
if (deadline <= time_msec()) {
#ifndef _WIN32
fatal_signal_handler(SIGALRM);
void
xgettimeofday(struct timeval *tv)
{
+#ifndef _WIN32
if (gettimeofday(tv, NULL) == -1) {
VLOG_FATAL("gettimeofday failed (%s)", ovs_strerror(errno));
}
+#else
+ ULARGE_INTEGER current_time = xgetfiletime();
+
+ tv->tv_sec = (current_time.QuadPart - unix_epoch.QuadPart) / 10000000;
+ tv->tv_usec = ((current_time.QuadPart - unix_epoch.QuadPart) %
+ 10000000) / 10;
+#endif
}
void
timespec_add(&monotonic_clock.warp, &monotonic_clock.warp, &ts);
ovs_mutex_unlock(&monotonic_clock.mutex);
seq_change(timewarp_seq);
- poll(NULL, 0, 10); /* give threads (eg. monitor) some chances to run */
+ /* give threads (eg. monitor) some chances to run */
+#ifndef _WIN32
+ poll(NULL, 0, 10);
+#else
+ Sleep(10);
+#endif
unixctl_command_reply(conn, "warped");
}