summaryrefslogtreecommitdiffstats
path: root/src/vlib/stats/init.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-03-14 13:04:38 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-03-14 18:33:32 +0000
commitd1bd9af16ed6575e08871d1cadd429f2d5925220 (patch)
tree24698c66736780d0e2a8c6d5e8526ca1dd43b467 /src/vlib/stats/init.c
parent85a9c101bffe99da141b496f95966258b922a440 (diff)
stats: support recursive locking
Type: improvement Change-Id: I85dd3d34bcb175dd68dda34a58cd454848a0fc2b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/stats/init.c')
-rw-r--r--src/vlib/stats/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vlib/stats/init.c b/src/vlib/stats/init.c
index d81916a288d..d24c1580a88 100644
--- a/src/vlib/stats/init.c
+++ b/src/vlib/stats/init.c
@@ -88,6 +88,8 @@ vlib_stats_init (vlib_main_t *vm)
shared_header->base = memaddr;
sm->stat_segment_lockp = clib_mem_alloc (sizeof (clib_spinlock_t));
+ sm->locking_thread_index = ~0;
+ sm->n_locks = 0;
clib_spinlock_init (sm->stat_segment_lockp);
oldheap = clib_mem_set_heap (sm->heap);