Home
last modified time | relevance | path

Searched refs:ww_ctx (Results 1 – 7 of 7) sorted by relevance

/kernel/locking/
Dww_mutex.h181 ww_mutex_lock_acquired(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx) in ww_mutex_lock_acquired() argument
195 DEBUG_LOCKS_WARN_ON(ww_ctx->done_acquire); in ww_mutex_lock_acquired()
197 if (ww_ctx->contending_lock) { in ww_mutex_lock_acquired()
202 DEBUG_LOCKS_WARN_ON(ww_ctx->contending_lock != ww); in ww_mutex_lock_acquired()
208 DEBUG_LOCKS_WARN_ON(ww_ctx->acquired > 0); in ww_mutex_lock_acquired()
209 ww_ctx->contending_lock = NULL; in ww_mutex_lock_acquired()
215 DEBUG_LOCKS_WARN_ON(ww_ctx->ww_class != ww->ww_class); in ww_mutex_lock_acquired()
217 ww_ctx->acquired++; in ww_mutex_lock_acquired()
218 ww->ctx = ww_ctx; in ww_mutex_lock_acquired()
278 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_die() argument
[all …]
Dww_rt_mutex.c12 int ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ww_ctx) in ww_mutex_trylock() argument
16 if (!ww_ctx) in ww_mutex_trylock()
24 if (ww_ctx->acquired == 0) in ww_mutex_trylock()
25 ww_ctx->wounded = 0; in ww_mutex_trylock()
28 ww_mutex_set_context_fastpath(lock, ww_ctx); in ww_mutex_trylock()
29 mutex_acquire_nest(&rtm->dep_map, 0, 1, &ww_ctx->dep_map, _RET_IP_); in ww_mutex_trylock()
38 __ww_rt_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ww_ctx, in __ww_rt_mutex_lock() argument
47 if (ww_ctx) { in __ww_rt_mutex_lock()
48 if (unlikely(ww_ctx == READ_ONCE(lock->ctx))) in __ww_rt_mutex_lock()
56 if (ww_ctx->acquired == 0) in __ww_rt_mutex_lock()
[all …]
Dmutex.c313 bool ww_mutex_spin_on_owner(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, in ww_mutex_spin_on_owner() argument
331 if (ww_ctx->acquired > 0 && READ_ONCE(ww->ctx)) in ww_mutex_spin_on_owner()
362 struct ww_acquire_ctx *ww_ctx, struct mutex_waiter *waiter) in mutex_spin_on_owner() argument
394 if (ww_ctx && !ww_mutex_spin_on_owner(lock, ww_ctx, waiter)) { in mutex_spin_on_owner()
458 mutex_optimistic_spin(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, in mutex_optimistic_spin() argument
493 if (!mutex_spin_on_owner(lock, owner, ww_ctx, waiter)) in mutex_optimistic_spin()
536 mutex_optimistic_spin(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, in mutex_optimistic_spin() argument
593 struct ww_acquire_ctx *ww_ctx, const bool use_ww_ctx) in __mutex_lock_common() argument
600 ww_ctx = NULL; in __mutex_lock_common()
607 if (ww_ctx) { in __mutex_lock_common()
[all …]
Drtmutex.c38 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_add_waiter() argument
44 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_check_waiters() argument
49 struct ww_acquire_ctx *ww_ctx) in ww_mutex_lock_acquired() argument
55 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_check_kill() argument
435 if (aw->ww_ctx) { in __waiter_less()
436 if (!bw->ww_ctx) in __waiter_less()
439 return (signed long)(aw->ww_ctx->stamp - in __waiter_less()
440 bw->ww_ctx->stamp) < 0; in __waiter_less()
739 if (IS_ENABLED(CONFIG_PREEMPT_RT) && waiter->ww_ctx && detect_deadlock) in rt_mutex_adjust_prio_chain()
814 if (IS_ENABLED(CONFIG_PREEMPT_RT) && orig_waiter && orig_waiter->ww_ctx) in rt_mutex_adjust_prio_chain()
[all …]
Dmutex.h17 struct ww_acquire_ctx *ww_ctx; member
Dmutex-debug.c33 waiter->ww_ctx = MUTEX_POISON_WW_CTX; in debug_mutex_lock_common()
Drtmutex_common.h41 struct ww_acquire_ctx *ww_ctx; member