plugins/vcgn-plugin: Fix vpp hang with pthread spinlock 82/2082/2
authorMichael Qiu <qdy220091330@gmail.com>
Fri, 8 Jul 2016 07:28:41 +0000 (15:28 +0800)
committerChris Luke <chris_luke@comcast.com>
Fri, 29 Jul 2016 13:01:38 +0000 (13:01 +0000)
commitc11ce3ee2552c363879082ed8cff048d87389eb9
tree37cec54a4daabf65fd32e16514213c8db74792b3
parent2828efcfb96be56f0ef894e2df1e309670a2283a
plugins/vcgn-plugin: Fix vpp hang with pthread spinlock

Currently, pthread spinlock is initialized in macro ASSERT, thus
the spinlock only will be initialized when CLIB_ASSERT_ENABLE is true.
But CLIB_ASSERT_ENABLE depends on CLIB_DEBUG been set.

Mostly, CLIB_DEBUG is zero, so spinlock will never been initialized,
which will lead vpp hang when try to hold the lock.

This patch fix this issue.

Change-Id: If01982b5df849834ccbc705f8e9291f2b6c32d0a
Signed-off-by: Michael Qiu <qiudayu@chinac.com>
plugins/vcgn-plugin/vcgn/cnat_db_v2.c