Commit e85db920 authored by Eric Petit's avatar Eric Petit

Fixed multithreading on BeOS (pthread emulation required)


git-svn-id: svn://svn.videolan.org/x264/trunk@241 df754926-b1dd-0310-bc7b-ec298dee348c
parent 10851d0e
......@@ -132,11 +132,16 @@ for opt do
--enable-pthread)
CFLAGS="$CFLAGS -DHAVE_PTHREAD=1"
pthread="yes"
if [ $SYS = MINGW ]; then
case $SYS in
MINGW)
LDFLAGS="$LDFLAGS -lpthreadGC2"
else
;;
BEOS)
;;
*)
LDFLAGS="$LDFLAGS -lpthread"
fi
;;
esac
;;
--enable-debug)
CFLAGS="$CFLAGS -g"
......
......@@ -27,8 +27,15 @@
#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)
#else
#include <pthread.h>
#endif
#endif
#include "common/common.h"
#include "common/cpu.h"
......
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