From 42e562f5e3adb948e71f7fa9c02409dbc2e8aa8d Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Fri, 23 Oct 1998 05:44:27 +0000 Subject: [PATCH] revise join; add arg and result types --- lib/isc/pthreads/include/isc/thread.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/isc/pthreads/include/isc/thread.h b/lib/isc/pthreads/include/isc/thread.h index 6b5045c76a..e0e05456ed 100644 --- a/lib/isc/pthreads/include/isc/thread.h +++ b/lib/isc/pthreads/include/isc/thread.h @@ -7,6 +7,9 @@ #include typedef pthread_t isc_thread_t; +typedef void * isc_threadresult_t; +typedef void * isc_threadarg_t; +typedef isc_threadresult_t (*isc_threadfunc_t)(isc_threadarg_t); /* XXX We could do fancier error handling... */ @@ -18,11 +21,11 @@ typedef pthread_t isc_thread_t; ((pthread_detach((t)) == 0) ? \ ISC_R_SUCCESS : ISC_R_UNEXPECTED) -#define isc_thread_join(t) \ - ((pthread_join((t), NULL) == 0) ? \ +#define isc_thread_join(t, rp) \ + ((pthread_join((t), (rp)) == 0) ? \ ISC_R_SUCCESS : ISC_R_UNEXPECTED) #define isc_thread_self \ - pthread_self + (unsigned long)pthread_self #endif /* ISC_THREAD_H */