Prepare for 2.1.2.
[cascardo/ovs.git] / lib / timeval.c
index dbfcdf5..5d01708 100644 (file)
@@ -240,11 +240,11 @@ time_poll(struct pollfd *pollfds, int n_pollfds, long long int timeout_when,
     int retval;
 
     time_init();
+    coverage_clear();
+    coverage_run();
     if (*last_wakeup) {
         log_poll_interval(*last_wakeup);
     }
-    coverage_clear();
-    coverage_run();
     start = time_msec();
 
     timeout_when = MIN(timeout_when, deadline);
@@ -535,6 +535,7 @@ timeval_warp_cb(struct unixctl_conn *conn,
     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 */
     unixctl_command_reply(conn, "warped");
 }