Lines Matching refs:class
58 static int __test_mutex(struct ww_class *class, unsigned int flags) in __test_mutex() argument
65 ww_mutex_init(&mtx.mutex, class); in __test_mutex()
67 ww_acquire_init(&ctx, class); in __test_mutex()
110 static int test_mutex(struct ww_class *class) in test_mutex() argument
116 ret = __test_mutex(class, i); in test_mutex()
124 static int test_aa(struct ww_class *class, bool trylock) in test_aa() argument
131 ww_mutex_init(&mutex, class); in test_aa()
132 ww_acquire_init(&ctx, class); in test_aa()
181 struct ww_class *class; member
196 ww_acquire_init_noinject(&ctx, abba->class); in test_abba_work()
222 static int test_abba(struct ww_class *class, bool trylock, bool resolve) in test_abba() argument
228 ww_mutex_init(&abba.a_mutex, class); in test_abba()
229 ww_mutex_init(&abba.b_mutex, class); in test_abba()
233 abba.class = class; in test_abba()
239 ww_acquire_init_noinject(&ctx, class); in test_abba()
284 struct ww_class *class; member
298 ww_acquire_init_noinject(&ctx, cycle->class); in test_cycle_work()
321 static int __test_cycle(struct ww_class *class, unsigned int nthreads) in __test_cycle() argument
334 cycle->class = class; in __test_cycle()
335 ww_mutex_init(&cycle->a_mutex, class); in __test_cycle()
375 static int test_cycle(struct ww_class *class, unsigned int ncpus) in test_cycle() argument
381 ret = __test_cycle(class, n); in test_cycle()
392 struct ww_class *class; member
452 ww_acquire_init(&ctx, stress->class); in stress_inorder_work()
520 ww_acquire_init(&ctx, stress->class); in stress_reorder_work()
579 static int stress(struct ww_class *class, int nlocks, int nthreads, unsigned int flags) in stress() argument
596 ww_mutex_init(&locks[n], class); in stress()
625 stress->class = class; in stress()
644 static int run_tests(struct ww_class *class) in run_tests() argument
649 ret = test_mutex(class); in run_tests()
653 ret = test_aa(class, false); in run_tests()
657 ret = test_aa(class, true); in run_tests()
662 ret = test_abba(class, i & 1, i & 2); in run_tests()
667 ret = test_cycle(class, ncpus); in run_tests()
671 ret = stress(class, 16, 2 * ncpus, STRESS_INORDER); in run_tests()
675 ret = stress(class, 16, 2 * ncpus, STRESS_REORDER); in run_tests()
679 ret = stress(class, 2046, hweight32(STRESS_ALL) * ncpus, STRESS_ALL); in run_tests()