summaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/lock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vppinfra/lock.h b/src/vppinfra/lock.h
index 59ab0e33c51..cc6a7f086b1 100644
--- a/src/vppinfra/lock.h
+++ b/src/vppinfra/lock.h
@@ -42,6 +42,9 @@ do { \
#define CLIB_LOCK_DBG_CLEAR(_p)
#endif
+#define CLIB_SPINLOCK_IS_LOCKED(_p) (*(_p))->lock
+#define CLIB_SPINLOCK_ASSERT_LOCKED(_p) ASSERT(CLIB_SPINLOCK_IS_LOCKED((_p)))
+
typedef struct
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);