mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
revise join; add arg and result types
This commit is contained in:
@@ -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 */
|
||||||
|
Reference in New Issue
Block a user