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:
parent
f191e3b4e8
commit
42e562f5e3
@ -7,6 +7,9 @@
|
||||
#include <isc/result.h>
|
||||
|
||||
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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user