X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_threads.h;h=e35ce880936754e2fb1d40832f0be2b1e1439f56;hb=bb5a8eb81e72432957f7dc0de32a9ae440884f62;hp=e543936f2cb0c1ad54a3dbf1d67d23e145a75b1e;hpb=546844365d9004af8e12f6386d2086700e6cfbe1;p=vlc diff --git a/include/vlc_threads.h b/include/vlc_threads.h index e543936f2c..e35ce88093 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -44,7 +44,7 @@ # include # include -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) /* pthreads (like Linux & BSD) */ +#else /* pthreads (like Linux & BSD) */ # define LIBVLC_USE_PTHREAD 1 # define _APPLE_C_SOURCE 1 /* Proper pthread semantics on OSX */ @@ -52,15 +52,7 @@ # include /* Needed for pthread_cond_timedwait */ # include -# ifdef DEBUG -# include -# endif - - /* This is not prototyped under Linux, though it exists. */ - int pthread_mutexattr_setkind_np( pthread_mutexattr_t *attr, int kind ); - -#else -# error no threads available on your system ! +# include #endif @@ -85,7 +77,7 @@ # define VLC_THREAD_PRIORITY_OUTPUT 15 # define VLC_THREAD_PRIORITY_HIGHEST 15 -#elif defined(PTHREAD_COND_T_IN_PTHREAD_H) +#elif defined(LIBVLC_USE_PTHREAD) # define VLC_THREAD_PRIORITY_LOW 0 # define VLC_THREAD_PRIORITY_INPUT 20 # define VLC_THREAD_PRIORITY_AUDIO 10 @@ -141,8 +133,6 @@ typedef struct HANDLE mutex; /* Win95/98/ME implementation */ CRITICAL_SECTION csection; - - vlc_object_t * p_this; } vlc_mutex_t; typedef struct @@ -155,8 +145,6 @@ typedef struct HANDLE semaphore; CRITICAL_SECTION csection; int i_win9x_cv; - - vlc_object_t * p_this; } vlc_cond_t; typedef struct @@ -175,16 +163,12 @@ typedef struct { int32_t init; sem_id lock; - - vlc_object_t * p_this; } vlc_mutex_t; typedef struct { int32_t init; thread_id thread; - - vlc_object_t * p_this; } vlc_cond_t; typedef struct @@ -192,17 +176,15 @@ typedef struct } vlc_threadvar_t; -#elif defined( PTHREAD_COND_T_IN_PTHREAD_H ) +#else typedef pthread_t vlc_thread_t; typedef struct { pthread_mutex_t mutex; - vlc_object_t * p_this; } vlc_mutex_t; typedef struct { pthread_cond_t cond; - vlc_object_t * p_this; } vlc_cond_t; typedef struct