Lines Matching full:cycle
290 struct test_cycle *cycle = container_of(work, typeof(*cycle), work); in test_cycle_work() local
295 ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
297 complete(cycle->a_signal); in test_cycle_work()
298 wait_for_completion(&cycle->b_signal); in test_cycle_work()
300 err = ww_mutex_lock(cycle->b_mutex, &ctx); in test_cycle_work()
303 ww_mutex_unlock(&cycle->a_mutex); in test_cycle_work()
304 ww_mutex_lock_slow(cycle->b_mutex, &ctx); in test_cycle_work()
305 erra = ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
309 ww_mutex_unlock(cycle->b_mutex); in test_cycle_work()
311 ww_mutex_unlock(&cycle->a_mutex); in test_cycle_work()
314 cycle->result = err ?: erra; in test_cycle_work()
328 struct test_cycle *cycle = &cycles[n]; in __test_cycle() local
330 ww_mutex_init(&cycle->a_mutex, &ww_class); in __test_cycle()
332 cycle->b_mutex = &cycles[0].a_mutex; in __test_cycle()
334 cycle->b_mutex = &cycles[n + 1].a_mutex; in __test_cycle()
337 cycle->a_signal = &cycles[last].b_signal; in __test_cycle()
339 cycle->a_signal = &cycles[n - 1].b_signal; in __test_cycle()
340 init_completion(&cycle->b_signal); in __test_cycle()
342 INIT_WORK(&cycle->work, test_cycle_work); in __test_cycle()
343 cycle->result = 0; in __test_cycle()
353 struct test_cycle *cycle = &cycles[n]; in __test_cycle() local
355 if (!cycle->result) in __test_cycle()
359 n, nthreads, cycle->result); in __test_cycle()