Commit 6bf1398b authored by Eric Petit's avatar Eric Petit

Use win32 native threads (you still have to --enable-pthread to use

 them, though)


git-svn-id: svn://svn.videolan.org/x264/trunk@250 df754926-b1dd-0310-bc7b-ec298dee348c
parent 46a48729
......@@ -155,10 +155,7 @@ for opt do
CFLAGS="$CFLAGS -DHAVE_PTHREAD=1"
pthread="yes"
case $SYS in
MINGW)
LDFLAGS="$LDFLAGS -lpthreadGC2"
;;
BEOS)
MINGW|CYGWIN|BEOS)
;;
*)
LDFLAGS="$LDFLAGS -lpthread"
......
......@@ -32,6 +32,12 @@
#define pthread_t thread_id
#define pthread_create(t,u,f,d) *(t)=spawn_thread(f,"",10,d)
#define pthread_join(t,s) wait_for_thread(t,(long*)s)
#elif defined(__WIN32__)
#include <windows.h>
#define pthread_t HANDLE
#define pthread_create(t,u,f,d) *(t)=CreateThread(NULL,0,f,d,0,NULL)
#define pthread_join(t,s) WaitForSingleObject(t,INFINITE); \
CloseHandle(t)
#else
#include <pthread.h>
#endif
......
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