• Home
  • Raw
  • Download

Lines Matching refs:ret

53 	int ret;  member
73 int ret; in create_rt_thread() local
80 ret = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); in create_rt_thread()
81 if (ret) { in create_rt_thread()
82 error("pthread_attr_setinheritsched\n", ret); in create_rt_thread()
86 ret = pthread_attr_setschedpolicy(&attr, policy); in create_rt_thread()
87 if (ret) { in create_rt_thread()
88 error("pthread_attr_setschedpolicy\n", ret); in create_rt_thread()
93 ret = pthread_attr_setschedparam(&attr, &schedp); in create_rt_thread()
94 if (ret) { in create_rt_thread()
95 error("pthread_attr_setschedparam\n", ret); in create_rt_thread()
99 ret = pthread_create(pth, &attr, func, arg); in create_rt_thread()
100 if (ret) { in create_rt_thread()
101 error("pthread_create\n", ret); in create_rt_thread()
123 args->ret = futex_wait_requeue_pi(&f1, old_val, &f2, args->timeout, in waiterfn()
126 info("waiter %ld woke with %d %s\n", args->id, args->ret, in waiterfn()
127 args->ret < 0 ? strerror(errno) : ""); in waiterfn()
129 if (args->ret < 0) { in waiterfn()
131 args->ret = 0; in waiterfn()
133 args->ret = RET_ERROR; in waiterfn()
140 info("Waiter %ld: exiting with %d\n", args->id, args->ret); in waiterfn()
141 pthread_exit((void *)&args->ret); in waiterfn()
165 args->ret = futex_cmp_requeue_pi(&f1, old_val, &f2, nr_wake, nr_requeue, in broadcast_wakerfn()
167 if (args->ret < 0) { in broadcast_wakerfn()
168 args->ret = RET_ERROR; in broadcast_wakerfn()
171 task_count += args->ret; in broadcast_wakerfn()
177 args->ret = RET_ERROR; in broadcast_wakerfn()
185 if (args->ret > 0) in broadcast_wakerfn()
186 args->ret = task_count; in broadcast_wakerfn()
188 info("Waker: exiting with %d\n", args->ret); in broadcast_wakerfn()
189 pthread_exit((void *)&args->ret); in broadcast_wakerfn()
217 args->ret = futex_cmp_requeue_pi(&f1, old_val, &f2, in signal_wakerfn()
220 if (args->ret < 0) in signal_wakerfn()
221 args->ret = -errno; in signal_wakerfn()
229 if (args->ret < 0) { in signal_wakerfn()
231 args->ret = RET_ERROR; in signal_wakerfn()
235 task_count += args->ret; in signal_wakerfn()
242 args->ret = RET_ERROR; in signal_wakerfn()
249 if (args->ret >= 0) in signal_wakerfn()
250 args->ret = task_count; in signal_wakerfn()
252 info("Waker: exiting with %d\n", args->ret); in signal_wakerfn()
254 pthread_exit((void *)&args->ret); in signal_wakerfn()
262 args->ret = futex_lock_pi(&f2, NULL, 0, FUTEX_PRIVATE_FLAG); in third_party_blocker()
263 if (args->ret) in third_party_blocker()
265 args->ret = futex_wait(&wake_complete, wake_complete, NULL, in third_party_blocker()
270 if (args->ret || ret2) { in third_party_blocker()
272 args->ret = RET_ERROR; in third_party_blocker()
275 pthread_exit((void *)&args->ret); in third_party_blocker()
287 int i, ret = RET_PASS; in unit_test() local
293 ret = clock_gettime(CLOCK_MONOTONIC, &ts); in unit_test()
310 ret = RET_ERROR; in unit_test()
323 ret = RET_ERROR; in unit_test()
331 ret = RET_ERROR; in unit_test()
337 waiter_ret = &args[0].ret; in unit_test()
347 if (!ret) { in unit_test()
349 ret = *waiter_ret; in unit_test()
350 else if (waker_arg.ret < 0) in unit_test()
351 ret = waker_arg.ret; in unit_test()
352 else if (blocker_arg.ret) in unit_test()
353 ret = blocker_arg.ret; in unit_test()
356 return ret; in unit_test()
361 int c, ret; in main() local
405 ret = unit_test(broadcast, locked, owner, timeout_ns); in main()
407 print_result(TEST_NAME, ret); in main()
408 return ret; in main()