Browse Source

Make IM compiled on Win32: add pthread_join() impl.

include/my_pthread.h:
  Add pthread_join() for Windows.
pull/374/head
unknown 19 years ago
parent
commit
4f09674675
  1. 3
      include/my_pthread.h

3
include/my_pthread.h

@ -130,6 +130,9 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
#define pthread_kill(A,B) pthread_dummy(0)
#define pthread_join(A,B) \
((WaitForSingleObject((A), INFINITE) != WAIT_OBJECT_0) || !CloseHandle(A))
/* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)

Loading…
Cancel
Save