bridge: Do not wait for status update when there is no bridge.
[cascardo/ovs.git] / vswitchd / system-stats.c
index 6c73933..b8a8855 100644 (file)
@@ -42,7 +42,7 @@
 #include "shash.h"
 #include "smap.h"
 #include "timeval.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(system_stats);
 
@@ -531,7 +531,7 @@ static bool enabled;
 static bool started OVS_GUARDED_BY(mutex);
 static struct smap *system_stats OVS_GUARDED_BY(mutex);
 
-static void *system_stats_thread_func(void *);
+OVS_NO_RETURN static void *system_stats_thread_func(void *);
 static void discard_stats(void);
 
 /* Enables or disables system stats collection, according to 'enable'. */
@@ -542,7 +542,8 @@ system_stats_enable(bool enable)
         ovs_mutex_lock(&mutex);
         if (enable) {
             if (!started) {
-                xpthread_create(NULL, NULL, system_stats_thread_func, NULL);
+                ovs_thread_create("system_stats",
+                                  system_stats_thread_func, NULL);
                 latch_init(&latch);
                 started = true;
             }
@@ -603,7 +604,7 @@ discard_stats(void) OVS_REQUIRES(mutex)
     }
 }
 
-static void * NO_RETURN
+static void *
 system_stats_thread_func(void *arg OVS_UNUSED)
 {
     pthread_detach(pthread_self());