40int pthread_create(pthread_t *thread,
const pthread_attr_t *attr,
41 void *(*start_routine)(
void*),
void *
arg)
52 const HANDLE hthread = CreateThread (0, 0,
53 (LPTHREAD_START_ROUTINE)start_routine,
56 if (INVALID_HANDLE_VALUE == hthread) {
63 thread->handle = hthread;
69int pthread_join(pthread_t thread,
void **value_ptr)
73 const DWORD retcode = WaitForSingleObject (thread.handle, INFINITE);
75 if (WAIT_OBJECT_0 == retcode) {
79 if (GetExitCodeThread (thread.handle, &exit_code))
80 *value_ptr = (
void*)exit_code;
93# define set_concurrency(ignore) 0
97# if defined (__sun) && defined (__SVR4)
101# define set_concurrency(n) thr_setconcurrency (n)
103# define set_concurrency(n) pthread_setconcurrency (n)