Lines Matching full:cycle
294 struct test_cycle *cycle = container_of(work, typeof(*cycle), work); in test_cycle_work() local
298 ww_acquire_init_noinject(&ctx, cycle->class); in test_cycle_work()
299 ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
301 complete(cycle->a_signal); in test_cycle_work()
302 wait_for_completion(&cycle->b_signal); in test_cycle_work()
304 err = ww_mutex_lock(cycle->b_mutex, &ctx); in test_cycle_work()
307 ww_mutex_unlock(&cycle->a_mutex); in test_cycle_work()
308 ww_mutex_lock_slow(cycle->b_mutex, &ctx); in test_cycle_work()
309 erra = ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
313 ww_mutex_unlock(cycle->b_mutex); in test_cycle_work()
315 ww_mutex_unlock(&cycle->a_mutex); in test_cycle_work()
318 cycle->result = err ?: erra; in test_cycle_work()
332 struct test_cycle *cycle = &cycles[n]; in __test_cycle() local
334 cycle->class = class; in __test_cycle()
335 ww_mutex_init(&cycle->a_mutex, class); in __test_cycle()
337 cycle->b_mutex = &cycles[0].a_mutex; in __test_cycle()
339 cycle->b_mutex = &cycles[n + 1].a_mutex; in __test_cycle()
342 cycle->a_signal = &cycles[last].b_signal; in __test_cycle()
344 cycle->a_signal = &cycles[n - 1].b_signal; in __test_cycle()
345 init_completion(&cycle->b_signal); in __test_cycle()
347 INIT_WORK(&cycle->work, test_cycle_work); in __test_cycle()
348 cycle->result = 0; in __test_cycle()
358 struct test_cycle *cycle = &cycles[n]; in __test_cycle() local
360 if (!cycle->result) in __test_cycle()
364 n, nthreads, cycle->result); in __test_cycle()