#include "fatal-signal.h"
#include "hash.h"
#include "hmap.h"
+#include "ovs-rcu.h"
#include "ovs-thread.h"
#include "signals.h"
#include "seq.h"
{
long long int *last_wakeup = last_wakeup_get();
long long int start;
+ bool quiescent;
int retval = 0;
time_init();
start = time_msec();
timeout_when = MIN(timeout_when, deadline);
+ quiescent = ovsrcu_is_quiescent();
for (;;) {
long long int now = time_msec();
time_left = timeout_when - now;
}
+ if (!quiescent) {
+ if (!time_left) {
+ ovsrcu_quiesce();
+ } else {
+ ovsrcu_quiesce_start();
+ }
+ }
+
#ifndef _WIN32
retval = poll(pollfds, n_pollfds, time_left);
if (retval < 0) {
}
#endif
+ if (!quiescent && time_left) {
+ ovsrcu_quiesce_end();
+ }
+
if (deadline <= time_msec()) {
#ifndef _WIN32
fatal_signal_handler(SIGALRM);
{
size_t n;
- n = strftime(s, max, format, &tm->tm);
+ /* Visual Studio 2013's behavior is to crash when 0 is passed as second
+ * argument to strftime. */
+ n = max ? strftime(s, max, format, &tm->tm) : 0;
if (n) {
char decimals[4];
char *p;