kernel_lock
LOCKDEBUG_ABORT(__func__, __LINE__, kernel_lock, &_kernel_lock_ops, msg)
if (!__SIMPLELOCK_LOCKED_P(kernel_lock))
__cpu_simple_lock_init(kernel_lock);
kernel_lock_dodebug = LOCKDEBUG_ALLOC(kernel_lock, &_kernel_lock_ops,
_KERNEL_LOCK_ASSERT(__SIMPLELOCK_LOCKED_P(kernel_lock));
LOCKDEBUG_WANTLOCK(kernel_lock_dodebug, kernel_lock, RETURN_ADDRESS,
if (__predict_true(__cpu_simple_lock_try(kernel_lock))) {
LOCKDEBUG_LOCKED(kernel_lock_dodebug, kernel_lock, NULL,
while (__SIMPLELOCK_LOCKED_P(kernel_lock)) {
} while (!__cpu_simple_lock_try(kernel_lock));
LOCKDEBUG_LOCKED(kernel_lock_dodebug, kernel_lock, NULL,
LOCKSTAT_EVENT_RA(lsflag, kernel_lock,
_KERNEL_LOCK_ASSERT(__SIMPLELOCK_LOCKED_P(kernel_lock));
LOCKDEBUG_UNLOCKED(kernel_lock_dodebug, kernel_lock,
__cpu_simple_unlock(kernel_lock);
return __SIMPLELOCK_LOCKED_P(kernel_lock);
} kernel_lock_cacheline[CACHE_LINE_SIZE / sizeof(struct kernel_lock)]
__strong_alias(kernel_lock, kernel_lock_cacheline)
LOCKDEBUG_BARRIER(kernel_lock, 1);
LOCKDEBUG_BARRIER(&kernel_lock, 1);
LOCKDEBUG_BARRIER(&kernel_lock, 1);
extern __cpu_simple_lock_t kernel_lock[];