Fix minor issues in clib_spinlock_unlock()
Change-Id: I20ce799c9dd57332c06003b466ee7c36169bce98 Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
Dave Barach
committed by
Florin Coras
parent
d172a62365
commit
fa77e8fb1c
@ -71,12 +71,14 @@ clib_spinlock_lock_if_init (clib_spinlock_t * p)
|
||||
static_always_inline void
|
||||
clib_spinlock_unlock (clib_spinlock_t * p)
|
||||
{
|
||||
(*p)->lock = 0;
|
||||
#if CLIB_DEBUG > 0
|
||||
(*p)->frame_address = 0;
|
||||
(*p)->pid = 0;
|
||||
(*p)->thread_index = 0;
|
||||
#endif
|
||||
/* Make sure all writes are complete before releasing the lock */
|
||||
CLIB_MEMORY_BARRIER ();
|
||||
(*p)->lock = 0;
|
||||
}
|
||||
|
||||
static_always_inline void
|
||||
|
Reference in New Issue
Block a user