5 #ifndef RZ_THREAD_INTERNAL_H
6 #define RZ_THREAD_INTERNAL_H
17 #define RZ_TH_TID HANDLE
18 #define RZ_TH_LOCK_T CRITICAL_SECTION
19 #define RZ_TH_COND_T CONDITION_VARIABLE
20 #define RZ_TH_SEM_T HANDLE
21 #define RZ_TH_RET_T DWORD WINAPI
24 #include <semaphore.h>
29 #if __linux__ && __GLIBC_MINOR < 12
30 #define HAVE_PTHREAD_NP 0
32 #define HAVE_PTHREAD_NP 1
37 #if __FreeBSD__ || __OpenBSD__ || __DragonFly__
39 #include <sys/cpuset.h>
41 #include <pthread_np.h>
43 #define RZ_TH_TID pthread_t
44 #define RZ_TH_LOCK_T pthread_mutex_t
45 #define RZ_TH_COND_T pthread_cond_t
46 #define RZ_TH_SEM_T sem_t *
47 #define RZ_TH_RET_T void *
49 #error Threading library only supported for pthread and w32
54 #include <mach/thread_act.h>
55 #include <mach/thread_policy.h>
58 #if __APPLE__ || __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ || __sun
59 #include <sys/param.h>
60 #include <sys/sysctl.h>
68 #include <kernel/scheduler.h>
void *(* RzThreadFunction)(void *user)
void * retv
Thread return value.
RZ_TH_TID tid
Thread identifier.
void * user
User defined thread data to pass (can be NULL).
RZ_IPI RZ_TH_TID rz_th_self(void)