2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

revise join; add arg and result types

This commit is contained in:
Bob Halley 1998-10-23 05:44:27 +00:00
parent f191e3b4e8
commit 42e562f5e3

View File

@ -7,6 +7,9 @@
#include <isc/result.h> #include <isc/result.h>
typedef pthread_t isc_thread_t; 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... */ /* XXX We could do fancier error handling... */
@ -18,11 +21,11 @@ typedef pthread_t isc_thread_t;
((pthread_detach((t)) == 0) ? \ ((pthread_detach((t)) == 0) ? \
ISC_R_SUCCESS : ISC_R_UNEXPECTED) ISC_R_SUCCESS : ISC_R_UNEXPECTED)
#define isc_thread_join(t) \ #define isc_thread_join(t, rp) \
((pthread_join((t), NULL) == 0) ? \ ((pthread_join((t), (rp)) == 0) ? \
ISC_R_SUCCESS : ISC_R_UNEXPECTED) ISC_R_SUCCESS : ISC_R_UNEXPECTED)
#define isc_thread_self \ #define isc_thread_self \
pthread_self (unsigned long)pthread_self
#endif /* ISC_THREAD_H */ #endif /* ISC_THREAD_H */