]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
* Untested YV12/I420 -> * blending. Works exactly like YUVA blending except when...
[vlc] / include / vlc_threads.h
index e36a07cdf08f27c32b21070e7e9c86339a854bfe..cc62078e86c7b6dfe1a0515d7ea5aa3355dd28fb 100644 (file)
@@ -29,6 +29,9 @@
   #error You are not libvlc or one of its plugins. You cannot include this file
 #endif
 
+#ifndef _VLC_THREADS_H_
+#define _VLC_THREADS_H_
+
 #include <stdio.h>
 
 #if defined(DEBUG) && defined(HAVE_SYS_TIME_H)
@@ -53,6 +56,7 @@
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )  /* pthreads (like Linux & BSD) */
 #   define LIBVLC_USE_PTHREAD 1
+#   define _APPLE_C_SOURCE    1 /* Proper pthread semantics on OSX */
 
 #   include <pthread.h>
 #   ifdef DEBUG
@@ -139,6 +143,10 @@ typedef struct
     pth_cond_t cond;
     vlc_object_t * p_this;
 } vlc_cond_t;
+typedef struct
+{
+    int handle;
+} vlc_threadvar_t;
 
 #elif defined( ST_INIT_IN_ST_H )
 typedef st_thread_t      vlc_thread_t;
@@ -152,6 +160,10 @@ typedef struct
     st_cond_t cond;
     vlc_object_t * p_this;
 } vlc_cond_t;
+typedef struct
+{
+    int handle;
+} vlc_threadvar_t;
 
 #elif defined( WIN32 ) || defined( UNDER_CE )
 typedef HANDLE vlc_thread_t;
@@ -182,6 +194,11 @@ typedef struct
     vlc_object_t * p_this;
 } vlc_cond_t;
 
+typedef struct
+{
+    DWORD   handle;
+} vlc_threadvar_t;
+
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
 /* This is the BeOS implementation of the vlc threads, note that the mutex is
  * not a real mutex and the cond_var is not like a pthread cond_var but it is
@@ -205,6 +222,11 @@ typedef struct
     vlc_object_t * p_this;
 } vlc_cond_t;
 
+typedef struct
+{
+} vlc_threadvar_t;
+
+
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
 typedef pthread_t       vlc_thread_t;
 typedef struct
@@ -218,6 +240,11 @@ typedef struct
     vlc_object_t * p_this;
 } vlc_cond_t;
 
+typedef struct
+{
+    pthread_key_t handle;
+} vlc_threadvar_t;
+
 #elif defined( HAVE_CTHREADS_H )
 typedef cthread_t       vlc_thread_t;
 
@@ -244,5 +271,11 @@ typedef struct
     vlc_object_t * p_this;
 } vlc_cond_t;
 
+typedef struct
+{
+    cthread_key_t handle;
+} vlc_threadvar_t;
+
 #endif
 
+#endif