Commit 4f096746 authored by unknown's avatar unknown

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


include/my_pthread.h:
  Add pthread_join() for Windows.
parent 83609387
...@@ -130,6 +130,9 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ ...@@ -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 my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B))
#define pthread_kill(A,B) pthread_dummy(0) #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 */ /* Dummy defines for easier code */
#define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B) #define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment