@@ -2372,9 +2372,7 @@ xsleep(unsigned int seconds)
}
-/* High resolution sleep. */
-void
-xnanosleep(uint64_t nanoseconds)
+static void
+xnanosleep__(uint64_t nanoseconds)
{
- ovsrcu_quiesce_start();
#ifndef _WIN32
int retval;
@@ -2404,7 +2402,22 @@ xnanosleep(uint64_t nanoseconds)
}
#endif
+}
+
+/* High resolution sleep with thread quiesce. */
+void
+xnanosleep(uint64_t nanoseconds)
+{
+ ovsrcu_quiesce_start();
+ xnanosleep__(nanoseconds);
ovsrcu_quiesce_end();
}
+/* High resolution sleep without thread quiesce. */
+void
+xnanosleep_no_quiesce(uint64_t nanoseconds)
+{
+ xnanosleep__(nanoseconds);
+}
+
/* Determine whether standard output is a tty or not. This is useful to decide
* whether to use color output or not when --color option for utilities is set
@@ -594,4 +594,5 @@ ovs_u128_is_superset(ovs_u128 super, ovs_u128 sub)
void xsleep(unsigned int seconds);
void xnanosleep(uint64_t nanoseconds);
+void xnanosleep_no_quiesce(uint64_t nanoseconds);
bool is_stdout_a_tty(void);