Lines Matching refs:ctx
52 struct ww_acquire_ctx ctx; in __test_mutex() local
56 ww_acquire_init(&ctx, &ww_class); in __test_mutex()
67 ww_mutex_lock(&mtx.mutex, (flags & TEST_MTX_CTX) ? &ctx : NULL); in __test_mutex()
84 ww_acquire_fini(&ctx); in __test_mutex()
115 struct ww_acquire_ctx ctx; in test_aa() local
119 ww_acquire_init(&ctx, &ww_class); in test_aa()
121 ww_mutex_lock(&mutex, &ctx); in test_aa()
130 ret = ww_mutex_lock(&mutex, &ctx); in test_aa()
143 ww_acquire_fini(&ctx); in test_aa()
160 struct ww_acquire_ctx ctx; in test_abba_work() local
163 ww_acquire_init(&ctx, &ww_class); in test_abba_work()
164 ww_mutex_lock(&abba->b_mutex, &ctx); in test_abba_work()
169 err = ww_mutex_lock(&abba->a_mutex, &ctx); in test_abba_work()
172 ww_mutex_lock_slow(&abba->a_mutex, &ctx); in test_abba_work()
173 err = ww_mutex_lock(&abba->b_mutex, &ctx); in test_abba_work()
179 ww_acquire_fini(&ctx); in test_abba_work()
187 struct ww_acquire_ctx ctx; in test_abba() local
199 ww_acquire_init(&ctx, &ww_class); in test_abba()
200 ww_mutex_lock(&abba.a_mutex, &ctx); in test_abba()
205 err = ww_mutex_lock(&abba.b_mutex, &ctx); in test_abba()
208 ww_mutex_lock_slow(&abba.b_mutex, &ctx); in test_abba()
209 err = ww_mutex_lock(&abba.a_mutex, &ctx); in test_abba()
215 ww_acquire_fini(&ctx); in test_abba()
249 struct ww_acquire_ctx ctx; in test_cycle_work() local
252 ww_acquire_init(&ctx, &ww_class); in test_cycle_work()
253 ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
258 err = ww_mutex_lock(cycle->b_mutex, &ctx); in test_cycle_work()
262 ww_mutex_lock_slow(cycle->b_mutex, &ctx); in test_cycle_work()
263 erra = ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
270 ww_acquire_fini(&ctx); in test_cycle_work()
383 struct ww_acquire_ctx ctx; in stress_inorder_work() local
394 ww_acquire_init(&ctx, &ww_class); in stress_inorder_work()
401 err = ww_mutex_lock(&locks[order[n]], &ctx); in stress_inorder_work()
415 ww_mutex_lock_slow(&locks[order[contended]], &ctx); in stress_inorder_work()
425 ww_acquire_fini(&ctx); in stress_inorder_work()
440 struct ww_acquire_ctx ctx; in stress_reorder_work() local
461 ww_acquire_init(&ctx, &ww_class); in stress_reorder_work()
464 err = ww_mutex_lock(ll->lock, &ctx); in stress_reorder_work()
478 ww_mutex_lock_slow(ll->lock, &ctx); in stress_reorder_work()
486 ww_acquire_fini(&ctx); in stress_reorder_work()