2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

utils: Introduce xsleep for RCU quiescent state

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Pravin
2014-03-21 09:20:42 -07:00
committed by Pravin B Shelar
parent 20ebd77152
commit 275eebb92d
3 changed files with 14 additions and 1 deletions

View File

@@ -30,6 +30,7 @@
#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
@@ -1726,6 +1727,17 @@ exit:
return ok;
}
unsigned int
xsleep(unsigned int seconds)
{
unsigned int t;
ovsrcu_quiesce_start();
t = sleep(seconds);
ovsrcu_quiesce_end();
return t;
}
#ifdef _WIN32
char *