Lines Matching refs:cycle
261 struct test_cycle *cycle = container_of(work, typeof(*cycle), work); in test_cycle_work() local
266 ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
268 complete(cycle->a_signal); in test_cycle_work()
269 wait_for_completion(&cycle->b_signal); in test_cycle_work()
271 err = ww_mutex_lock(cycle->b_mutex, &ctx); in test_cycle_work()
274 ww_mutex_unlock(&cycle->a_mutex); in test_cycle_work()
275 ww_mutex_lock_slow(cycle->b_mutex, &ctx); in test_cycle_work()
276 erra = ww_mutex_lock(&cycle->a_mutex, &ctx); in test_cycle_work()
280 ww_mutex_unlock(cycle->b_mutex); in test_cycle_work()
282 ww_mutex_unlock(&cycle->a_mutex); in test_cycle_work()
285 cycle->result = err ?: erra; in test_cycle_work()
299 struct test_cycle *cycle = &cycles[n]; in __test_cycle() local
301 ww_mutex_init(&cycle->a_mutex, &ww_class); in __test_cycle()
303 cycle->b_mutex = &cycles[0].a_mutex; in __test_cycle()
305 cycle->b_mutex = &cycles[n + 1].a_mutex; in __test_cycle()
308 cycle->a_signal = &cycles[last].b_signal; in __test_cycle()
310 cycle->a_signal = &cycles[n - 1].b_signal; in __test_cycle()
311 init_completion(&cycle->b_signal); in __test_cycle()
313 INIT_WORK(&cycle->work, test_cycle_work); in __test_cycle()
314 cycle->result = 0; in __test_cycle()
324 struct test_cycle *cycle = &cycles[n]; in __test_cycle() local
326 if (!cycle->result) in __test_cycle()
330 n, nthreads, cycle->result); in __test_cycle()