From: Gurucharan Shetty Date: Wed, 12 Mar 2014 17:21:05 +0000 (-0700) Subject: timeval: Sleep instead of poll(). X-Git-Tag: v2.3~532 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=eb1ddf985264657b533275d488979d78a3acb15f;p=cascardo%2Fovs.git timeval: Sleep instead of poll(). The WSAPoll() function, which is similar to poll() doesnot simply sleep when the fd array is NULL. So use Sleep() instead. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- diff --git a/lib/timeval.c b/lib/timeval.c index 74efa59f2..ef806e762 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -637,7 +637,12 @@ 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 */ + /* give threads (eg. monitor) some chances to run */ +#ifndef _WIN32 + poll(NULL, 0, 10); +#else + Sleep(10); +#endif unixctl_command_reply(conn, "warped"); }