ovs-thread: Quiesce in xpthread_barrier_wait().
[sliver-openvswitch.git] / lib / ovs-rcu.c
index ac4513b..b3c434d 100644 (file)
@@ -127,12 +127,20 @@ ovsrcu_quiesce_start(void)
 void
 ovsrcu_quiesce(void)
 {
+    ovsrcu_init();
     ovsrcu_perthread_get()->seqno = seq_read(global_seqno);
     seq_change(global_seqno);
 
     ovsrcu_quiesced();
 }
 
+bool
+ovsrcu_is_quiescent(void)
+{
+    ovsrcu_init();
+    return pthread_getspecific(perthread_key) == NULL;
+}
+
 static void
 ovsrcu_synchronize(void)
 {
@@ -226,6 +234,7 @@ ovsrcu_call_postponed(void)
 static void *
 ovsrcu_postpone_thread(void *arg OVS_UNUSED)
 {
+    set_subprogram_name("urcu");
     pthread_detach(pthread_self());
 
     for (;;) {