aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorJingLiuZTE <liu.jing5@zte.com.cn>2017-11-08 15:35:01 +0800
committerFlorin Coras <florin.coras@gmail.com>2017-11-09 02:10:15 +0000
commitace9fc92ca9521c9a20dd3306b76c678052856b9 (patch)
tree9b6f65ce92fa855a8465817014f5a943003f01b3 /src/vppinfra
parent5ed8774529147ec9a103aaf48d4a708a287a2f2a (diff)
lock init
writer_lock must be inited before used. Change-Id: Ib258aa09b3bccc4de6edba0eb75a7eec20f1a61f Signed-off-by: JingLiuZTE <liu.jing5@zte.com.cn> (cherry picked from commit 4c9f2a805038a2d4f663b05a3d08ac4ee1eec3da)
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/bihash_template.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c
index 2a5a5cd228a..56c410b5a51 100644
--- a/src/vppinfra/bihash_template.c
+++ b/src/vppinfra/bihash_template.c
@@ -35,6 +35,7 @@ void BV (clib_bihash_init)
vec_validate_aligned (h->buckets, nbuckets - 1, CLIB_CACHE_LINE_BYTES);
h->writer_lock = clib_mem_alloc_aligned (CLIB_CACHE_LINE_BYTES,
CLIB_CACHE_LINE_BYTES);
+ h->writer_lock[0] = 0;
for (i = 0; i < nbuckets; i++)
BV (clib_bihash_reset_cache) (h->buckets + i);