Commit 8c6e6647 authored by Loren Merritt's avatar Loren Merritt

win32 threads enabled by default


git-svn-id: svn://svn.videolan.org/x264/trunk@258 df754926-b1dd-0310-bc7b-ec298dee348c
parent 96813e36
......@@ -26,18 +26,19 @@
#include <string.h>
#include <math.h>
#if HAVE_PTHREAD
#ifdef SYS_BEOS
#include <kernel/OS.h>
#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__)
#ifdef __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)
#define HAVE_PTHREAD 1
#elif HAVE_PTHREAD
#ifdef SYS_BEOS
#include <kernel/OS.h>
#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)
#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