2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

util: xleep for Windows.

Windows does not have a sleep(seconds). But it does have
a Sleep(milliseconds). Sleep() in windows does not have a
return value. Since we are not using the return value for xsleep()
anywhere as of now, don't return any.

Introduced by commit 275eebb9 (utils: Introduce xsleep for RCU quiescent state)

CC: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
Gurucharan Shetty
2014-03-28 15:15:02 -07:00
parent 437d0d22ab
commit 5fd2f418fa
2 changed files with 7 additions and 6 deletions

View File

@@ -1727,15 +1727,16 @@ exit:
return ok;
}
unsigned int
void
xsleep(unsigned int seconds)
{
unsigned int t;
ovsrcu_quiesce_start();
t = sleep(seconds);
#ifdef _WIN32
Sleep(seconds * 1000);
#else
sleep(seconds);
#endif
ovsrcu_quiesce_end();
return t;
}
#ifdef _WIN32