Lock Validator Assertions
include/sync/lock_chk_assert.h View source View on GitHubMacros
Section titled “Macros”LOCK_CHK_ASSERT_HELD_1
Section titled “LOCK_CHK_ASSERT_HELD_1”#define LOCK_CHK_ASSERT_HELD_1(l) \
_Generic((l), \
struct spinlock *: spinlock_assert_held_internal, \
struct qspinlock *: qspin_assert_held_internal, \
struct mutex *: mutex_assert_held_internal, \
struct mutex_simple *: mutex_simple_assert_held_internal)( \
(l), LOCK_CHK_SITE_HERE()) LOCK_CHK_ASSERT_HELD_2
Section titled “LOCK_CHK_ASSERT_HELD_2”#define LOCK_CHK_ASSERT_HELD_2(l, mode) \
_Generic((l), struct rwlock *: rwlock_assert_held_internal)( \
(l), (mode), LOCK_CHK_SITE_HERE()) LOCK_CHK_ASSERT_HELD
Section titled “LOCK_CHK_ASSERT_HELD”#define LOCK_CHK_ASSERT_HELD(...) \
_DISPATCH(LOCK_CHK_ASSERT_HELD, PP_NARG(__VA_ARGS__))(__VA_ARGS__) LOCK_CHK_ASSERT_NOT_HELD
Section titled “LOCK_CHK_ASSERT_NOT_HELD”#define LOCK_CHK_ASSERT_NOT_HELD(l) \
_Generic((l), \
struct spinlock *: spinlock_assert_not_held_internal, \
struct qspinlock *: qspin_assert_not_held_internal, \
struct mutex *: mutex_assert_not_held_internal, \
struct mutex_simple *: mutex_simple_assert_not_held_internal, \
struct rwlock *: rwlock_assert_not_held_internal)( \
(l), LOCK_CHK_SITE_HERE())