summaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-26 17:15:48 +0100
committerOle Trøan <otroan@employees.org>2019-02-27 08:24:46 +0000
commit8343ee5665942353e57ee074da62b9d07c1c510b (patch)
treeac2137439824caba62c9ee2e8c1a6ee77fbcfb30 /src/vlib/threads.h
parent854559d154288945e03af6b6b7ce91c383667180 (diff)
Fix crash in barrier sync when vlib_worker_threads is zero
Change-Id: I6819dd9dbfc15c17740bdb98b51bdd639ef8c4d2 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/threads.h')
-rw-r--r--src/vlib/threads.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vlib/threads.h b/src/vlib/threads.h
index 95fcf3d83d7..5a295e03319 100644
--- a/src/vlib/threads.h
+++ b/src/vlib/threads.h
@@ -201,9 +201,10 @@ u32 vlib_frame_queue_main_init (u32 node_index, u32 frame_queue_nelts);
#define BARRIER_SYNC_TIMEOUT (1.0)
#endif
-#define vlib_worker_thread_barrier_sync(X) {vlib_worker_threads[0].barrier_caller=__FUNCTION__;vlib_worker_thread_barrier_sync_int(X);}
+#define vlib_worker_thread_barrier_sync(X) {vlib_worker_thread_barrier_sync_int(X, __FUNCTION__);}
-void vlib_worker_thread_barrier_sync_int (vlib_main_t * vm);
+void vlib_worker_thread_barrier_sync_int (vlib_main_t * vm,
+ const char *func_name);
void vlib_worker_thread_barrier_release (vlib_main_t * vm);
void vlib_worker_thread_node_refork (void);