Lines Matching refs:ret

44 	int ret;  in futex_hash_slots_set_verify()  local
46 ret = futex_hash_slots_set(slots); in futex_hash_slots_set_verify()
47 if (ret != 0) { in futex_hash_slots_set_verify()
51 ret = futex_hash_slots_get(); in futex_hash_slots_set_verify()
52 if (ret != slots) { in futex_hash_slots_set_verify()
54 slots, ret); in futex_hash_slots_set_verify()
62 int ret; in futex_hash_slots_set_must_fail() local
64 ret = futex_hash_slots_set(slots); in futex_hash_slots_set_must_fail()
65 ksft_test_result(ret < 0, "futex_hash_slots_set(%d)\n", in futex_hash_slots_set_must_fail()
87 int i, ret; in create_max_threads() local
90 ret = pthread_create(&threads[i], NULL, thread_fn, NULL); in create_max_threads()
91 if (ret) in create_max_threads()
98 int i, ret; in join_max_threads() local
101 ret = pthread_join(threads[i], NULL); in join_max_threads()
102 if (ret) in join_max_threads()
114 int ret; in futex_dummy_op() local
123 ret = pthread_mutex_timedlock(&lock, &timeout); in futex_dummy_op()
124 if (ret == 0) in futex_dummy_op()
127 if (ret != ETIMEDOUT) in futex_dummy_op()
128 ksft_exit_fail_msg("pthread_mutex_timedlock() did not timeout: %d.\n", ret); in futex_dummy_op()
148 int ret, retry = 20; in main() local
172 ret = pthread_mutexattr_init(&mutex_attr_pi); in main()
173 ret |= pthread_mutexattr_setprotocol(&mutex_attr_pi, PTHREAD_PRIO_INHERIT); in main()
174 ret |= pthread_mutex_init(&global_lock, &mutex_attr_pi); in main()
175 if (ret != 0) { in main()
179 ret = futex_hash_slots_get(); in main()
180 if (ret != 0) in main()
181 ksft_exit_fail_msg("futex_hash_slots_get() failed: %d, %m\n", ret); in main()
184 ret = pthread_create(&threads[0], NULL, thread_return_fn, NULL); in main()
185 if (ret != 0) in main()
186 ksft_exit_fail_msg("pthread_create() failed: %d, %m\n", ret); in main()
188 ret = pthread_join(threads[0], NULL); in main()
189 if (ret != 0) in main()
190 ksft_exit_fail_msg("pthread_join() failed: %d, %m\n", ret); in main()
202 ret = pthread_barrier_init(&barrier_main, NULL, MAX_THREADS + 1); in main()
203 if (ret != 0) in main()
206 ret = pthread_mutex_lock(&global_lock); in main()
207 if (ret != 0) in main()
246 ret = pthread_mutex_unlock(&global_lock); in main()
255 ret = futex_hash_slots_set(15); in main()
256 ksft_test_result(ret < 0, "Use 15 slots\n"); in main()
264 ret = pthread_barrier_init(&barrier_main, NULL, MAX_THREADS); in main()
269 ret = futex_hash_slots_get(); in main()
270 ksft_test_result(ret == 2, "No more auto-resize after manaul setting, got %d\n", in main()
271 ret); in main()
280 ret = futex_hash_slots_set(0); in main()
281 ksft_test_result(ret == 0, "Global hash request\n"); in main()
282 if (ret != 0) in main()
291 ret = pthread_barrier_init(&barrier_main, NULL, MAX_THREADS); in main()
292 if (ret != 0) { in main()
299 ret = futex_hash_slots_get(); in main()
300 ksft_test_result(ret == 0, "Continue to use global hash\n"); in main()