Lines Matching refs:ctx
190 DEBUG_LOCKS_WARN_ON(ww->ctx); in ww_mutex_lock_acquired()
218 ww->ctx = ww_ctx; in ww_mutex_lock_acquired()
396 ww_mutex_set_context_fastpath(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) in ww_mutex_set_context_fastpath() argument
401 ww_mutex_lock_acquired(lock, ctx); in ww_mutex_set_context_fastpath()
429 __ww_mutex_check_waiters(&lock->base, ctx, &wake_q); in ww_mutex_set_context_fastpath()
466 struct ww_acquire_ctx *ctx) in __ww_mutex_check_kill() argument
469 struct ww_acquire_ctx *hold_ctx = READ_ONCE(ww->ctx); in __ww_mutex_check_kill()
472 if (ctx->acquired == 0) in __ww_mutex_check_kill()
475 if (!ctx->is_wait_die) { in __ww_mutex_check_kill()
476 if (ctx->wounded) in __ww_mutex_check_kill()
477 return __ww_mutex_kill(lock, ctx); in __ww_mutex_check_kill()
482 if (hold_ctx && __ww_ctx_less(ctx, hold_ctx)) in __ww_mutex_check_kill()
483 return __ww_mutex_kill(lock, ctx); in __ww_mutex_check_kill()
495 return __ww_mutex_kill(lock, ctx); in __ww_mutex_check_kill()
578 __ww_mutex_wound(lock, ww_ctx, ww->ctx, wake_q); in __ww_mutex_add_waiter()
586 if (lock->ctx) { in __ww_mutex_unlock()
588 DEBUG_LOCKS_WARN_ON(!lock->ctx->acquired); in __ww_mutex_unlock()
590 if (lock->ctx->acquired > 0) in __ww_mutex_unlock()
591 lock->ctx->acquired--; in __ww_mutex_unlock()
592 lock->ctx = NULL; in __ww_mutex_unlock()