Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/lock.h
Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | if (LOCK_LOG_TEST((lo), (flags))) \ | ||||
CTR4(KTR_LOCK, "%s: %p (%s) %s", __func__, (lo), \ | CTR4(KTR_LOCK, "%s: %p (%s) %s", __func__, (lo), \ | ||||
LOCK_CLASS(lo)->lc_name, (lo)->lo_name); \ | LOCK_CLASS(lo)->lc_name, (lo)->lo_name); \ | ||||
} while (0) | } while (0) | ||||
#define LOCK_LOG_DESTROY(lo, flags) LOCK_LOG_INIT(lo, flags) | #define LOCK_LOG_DESTROY(lo, flags) LOCK_LOG_INIT(lo, flags) | ||||
#define lock_initialized(lo) ((lo)->lo_flags & LO_INITIALIZED) | #define lock_initialized(lo) ((lo)->lo_flags & LO_INITIALIZED) | ||||
/* | |||||
* Helpful macros for quickly coming up with assertions with informative | |||||
* panic messages. | |||||
*/ | |||||
#define MPASS(ex) MPASS4(ex, #ex, __FILE__, __LINE__) | |||||
#define MPASS2(ex, what) MPASS4(ex, what, __FILE__, __LINE__) | |||||
#define MPASS3(ex, file, line) MPASS4(ex, #ex, file, line) | |||||
#define MPASS4(ex, what, file, line) \ | |||||
KASSERT((ex), ("Assertion %s failed at %s:%d", what, file, line)) | |||||
extern struct lock_class lock_class_mtx_sleep; | extern struct lock_class lock_class_mtx_sleep; | ||||
extern struct lock_class lock_class_mtx_spin; | extern struct lock_class lock_class_mtx_spin; | ||||
extern struct lock_class lock_class_sx; | extern struct lock_class lock_class_sx; | ||||
extern struct lock_class lock_class_rw; | extern struct lock_class lock_class_rw; | ||||
extern struct lock_class lock_class_rm; | extern struct lock_class lock_class_rm; | ||||
extern struct lock_class lock_class_rm_sleepable; | extern struct lock_class lock_class_rm_sleepable; | ||||
extern struct lock_class lock_class_lockmgr; | extern struct lock_class lock_class_lockmgr; | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |