Commit 4f096746 authored by unknown's avatar unknown
Browse files

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


include/my_pthread.h:
  Add pthread_join() for Windows.
parent 83609387
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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)