Lock Validation
include/sync/lock_chk.h View source View on GitHubStructs
Section titled “Structs”lock_chk_site
Section titled “lock_chk_site”lock_chk_class
Section titled “lock_chk_class”lock_chk_flags
Section titled “lock_chk_flags” enum lock_chk_flags : uint8_t (4 variants) source
§
LOCK_UNCHKD = 0 §
LOCK_CHKD_ORDER = 1 << 0 §
LOCK_CHKD_THREAD = 1 << 1 §
LOCK_CHKD_FULL = LOCK_CHKD_ORDER | LOCK_CHKD_THREAD lock_chk_type
Section titled “lock_chk_type” enum lock_chk_type : uint8_t (5 variants) source
lock_chk_mode
Section titled “lock_chk_mode”lock_chk_engine_state
Section titled “lock_chk_engine_state” enum lock_chk_engine_state : uint8_t (3 variants) source
lock_op_flags
Section titled “lock_op_flags” enum lock_op_flags : uint8_t (6 variants) source
Functions
Section titled “Functions”lock_debug_spin_classify
Section titled “lock_debug_spin_classify”void lock_debug_spin_classify(
atomic(enum lock_op_flags) * usage,
enum lock_op_flags requested,
struct lock_chk_lock *lock,
const struct lock_chk_site *site
) source lock_debug_spin_push
Section titled “lock_debug_spin_push”bool lock_debug_spin_push(
struct lock_chk_lock *lock,
enum irql prev_irql,
const struct lock_chk_site *site
) source lock_debug_spin_validate_top
Section titled “lock_debug_spin_validate_top”void lock_debug_spin_validate_top(
struct lock_chk_lock *lock,
enum irql prev_irql,
const struct lock_chk_site *site
) source lock_debug_spin_pop
Section titled “lock_debug_spin_pop”void lock_debug_spin_pop(struct lock_chk_lock *lock) source lock_chk_note_use
Section titled “lock_chk_note_use”void lock_chk_note_use(
struct lock_chk_lock *lock,
enum lock_op_flags flags
) source lock_chk_assert_schedulable
Section titled “lock_chk_assert_schedulable”void lock_chk_assert_schedulable(const struct lock_chk_site *site) source lock_chk_note_lock_use
Section titled “lock_chk_note_lock_use”void lock_chk_note_lock_use(
struct lock_chk_lock *lock,
bool manages_irql,
bool raw_operation
) source lock_chk_assert_schedulable
Section titled “lock_chk_assert_schedulable”void lock_chk_assert_schedulable(const struct lock_chk_site *site) source lock_chk_init
Section titled “lock_chk_init”void lock_chk_init(void) source lock_chk_tracking_active
Section titled “lock_chk_tracking_active”bool lock_chk_tracking_active(void) source Macros
Section titled “Macros”LOCK_OP_IRQ_MASK
Section titled “LOCK_OP_IRQ_MASK”#define LOCK_OP_IRQ_MASK 0x3 source LOCK_OP_KIND_MASK
Section titled “LOCK_OP_KIND_MASK”#define LOCK_OP_KIND_MASK 0x18 source LOCK_CHK_SITE_HERE
Section titled “LOCK_CHK_SITE_HERE”#define LOCK_CHK_SITE_HERE() source Expansion
#define LOCK_CHK_SITE_HERE() \
({ \
static const struct lock_chk_site __site = { \
.file = __RELFILE__, \
.func = __func__, \
.line = __LINE__, \
}; \
&__site; \
}) LOCK_CHK_CLASS
Section titled “LOCK_CHK_CLASS”#define LOCK_CHK_CLASS(id) source Expansion
#define LOCK_CHK_CLASS(id) (&__lock_chk_class_##id) LOCK_CHK_CLASS_DEFINE
Section titled “LOCK_CHK_CLASS_DEFINE”#define LOCK_CHK_CLASS_DEFINE(id) source Expansion
#define LOCK_CHK_CLASS_DEFINE(id) \
extern const struct lock_chk_class __lock_chk_class_##id; \
const struct lock_chk_class __lock_chk_class_##id = { \
.name = #id, \
.file = __RELFILE__, \
.line = __LINE__, \
} LOCK_CHK_CLASS_DEFINE_LOCAL
Section titled “LOCK_CHK_CLASS_DEFINE_LOCAL”#define LOCK_CHK_CLASS_DEFINE_LOCAL(id) source Expansion
#define LOCK_CHK_CLASS_DEFINE_LOCAL(id) \
static const struct lock_chk_class __lock_chk_class_##id = { \
.name = #id, \
.file = __RELFILE__, \
.line = __LINE__, \
} LOCK_CHK_CLASS_EXTERN
Section titled “LOCK_CHK_CLASS_EXTERN”#define LOCK_CHK_CLASS_EXTERN(id) source Expansion
#define LOCK_CHK_CLASS_EXTERN(id) \
extern const struct lock_chk_class __lock_chk_class_##id LOCK_CHK_SITE_HERE
Section titled “LOCK_CHK_SITE_HERE”#define LOCK_CHK_SITE_HERE() source Expansion
#define LOCK_CHK_SITE_HERE() ((const struct lock_chk_site *) NULL) LOCK_CHK_CLASS
Section titled “LOCK_CHK_CLASS”#define LOCK_CHK_CLASS(id) source Expansion
#define LOCK_CHK_CLASS(id) ((const struct lock_chk_class *) NULL) LOCK_CHK_CLASS_DEFINE
Section titled “LOCK_CHK_CLASS_DEFINE”#define LOCK_CHK_CLASS_DEFINE(id) source Expansion
#define LOCK_CHK_CLASS_DEFINE(id) LOCK_CHK_CLASS_DEFINE_LOCAL
Section titled “LOCK_CHK_CLASS_DEFINE_LOCAL”#define LOCK_CHK_CLASS_DEFINE_LOCAL(id) source Expansion
#define LOCK_CHK_CLASS_DEFINE_LOCAL(id) LOCK_CHK_CLASS_EXTERN
Section titled “LOCK_CHK_CLASS_EXTERN”#define LOCK_CHK_CLASS_EXTERN(id) source Expansion
#define LOCK_CHK_CLASS_EXTERN(id)