summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/main.h1
-rw-r--r--src/vlib/threads.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/vlib/main.h b/src/vlib/main.h
index 7c34fb6528d..64f2859c055 100644
--- a/src/vlib/main.h
+++ b/src/vlib/main.h
@@ -209,6 +209,7 @@ typedef struct vlib_main_t
/* Vector of pending RPC requests */
uword *pending_rpc_requests;
+ clib_spinlock_t pending_rpc_lock;
} vlib_main_t;
diff --git a/src/vlib/threads.c b/src/vlib/threads.c
index c99458ddaec..7ecfa309378 100644
--- a/src/vlib/threads.c
+++ b/src/vlib/threads.c
@@ -699,6 +699,9 @@ start_workers (vlib_main_t * vm)
vlib_worker_threads->node_reforks_required =
clib_mem_alloc_aligned (sizeof (u32), CLIB_CACHE_LINE_BYTES);
+ /* We'll need the rpc vector lock... */
+ clib_spinlock_init (&vm->pending_rpc_lock);
+
/* Ask for an initial barrier sync */
*vlib_worker_threads->workers_at_barrier = 0;
*vlib_worker_threads->wait_at_barrier = 1;