Lines Matching refs:ret
28 #define CHECK_RETURN_VAL_OR_FAIL(ret,str) \ argument
29 ({ if ((ret) != 0) \
31 printf ("%s failed: %s\n", (str), strerror (ret)); \
32 ret = 1; \
49 int ret = 0; in thr() local
51 ret = pthread_mutexattr_init (&mutexAttr); in thr()
52 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutexattr_init"); in thr()
54 ret = pthread_mutexattr_setprotocol (&mutexAttr, PTHREAD_PRIO_INHERIT); in thr()
55 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutexattr_setprotocol"); in thr()
57 ret = pthread_mutex_init (&mutex, &mutexAttr); in thr()
58 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutex_init"); in thr()
60 ret = pthread_cond_init (&cond, 0); in thr()
61 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cond_init"); in thr()
66 ret = pthread_mutex_lock (&mutex); in thr()
67 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_mutex_lock"); in thr()
70 ret = pthread_cond_wait (&cond, &mutex); in thr()
71 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cond_wait"); in thr()
76 return (void *) (uintptr_t) ret; in thr()
83 int ret = 0; in do_test() local
85 ret = pthread_create (&thread, 0, thr, &thr_ret); in do_test()
86 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_create"); in do_test()
92 ret = pthread_cancel (thread); in do_test()
93 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_cancel"); in do_test()
96 ret = pthread_join (thread, NULL); in do_test()
97 CHECK_RETURN_VAL_OR_FAIL (ret, "pthread_join"); in do_test()
105 return ret; in do_test()