]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
* ALL: WinCE compilation fixes (mostly nonexistent headers). A lot of
[vlc] / include / vlc_threads.h
index 4cda186a33d3fcac467686eb68c577b94728b62f..4a94093984bb470bdb4c6c5ef9ed8db302aa5d92 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides portable declarations for mutexes & conditions
  *****************************************************************************
  * Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads.h,v 1.10 2002/08/29 23:53:22 massiot Exp $
+ * $Id: vlc_threads.h,v 1.17 2002/11/10 18:04:22 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -28,7 +28,9 @@
 #include <stdio.h>
 
 #if defined(GPROF) || defined(DEBUG)
-#   include <sys/time.h>
+#   ifdef HAVE_SYS_TIME_H
+#       include <sys/time.h>
+#   endif
 #endif
 
 #if defined( PTH_INIT_IN_PTH_H )                                  /* GNU Pth */
 #elif defined( ST_INIT_IN_ST_H )                            /* State threads */
 #   include <st.h>
 
-#elif defined( WIN32 )                                          /* Win32 API */
-#   include <process.h>
+#elif defined( WIN32 )
+#   if defined( UNDER_CE )
+                                                                /* WinCE API */
+#   else
+#       include <process.h>                                     /* Win32 API */
+#   endif
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )  /* pthreads (like Linux & BSD) */
 #   include <pthread.h>
 
 /* Thread priorities */
 #ifdef SYS_DARWIN
-#   define VLC_THREAD_PRIORITY_LOW 10
+#   define VLC_THREAD_PRIORITY_LOW 31
 #   define VLC_THREAD_PRIORITY_INPUT 37
 #   define VLC_THREAD_PRIORITY_AUDIO 38
-#   define VLC_THREAD_PRIORITY_OUTPUT 38
+#   define VLC_THREAD_PRIORITY_VIDEO 31
+#   define VLC_THREAD_PRIORITY_OUTPUT 31
 
 #elif defined(WIN32)
 #   define VLC_THREAD_PRIORITY_LOW 0
-#   define VLC_THREAD_PRIORITY_INPUT THREAD_PRIORITY_ABOVE_NORMAL
-#   define VLC_THREAD_PRIORITY_AUDIO THREAD_PRIORITY_ABOVE_NORMAL
+#   define VLC_THREAD_PRIORITY_INPUT THREAD_PRIORITY_TIME_CRITICAL
+#   define VLC_THREAD_PRIORITY_AUDIO THREAD_PRIORITY_HIGHEST
+#   define VLC_THREAD_PRIORITY_VIDEO 0
 #   define VLC_THREAD_PRIORITY_OUTPUT THREAD_PRIORITY_ABOVE_NORMAL
 
 #else
 #   define VLC_THREAD_PRIORITY_LOW 0
 #   define VLC_THREAD_PRIORITY_INPUT 0
 #   define VLC_THREAD_PRIORITY_AUDIO 0
+#   define VLC_THREAD_PRIORITY_VIDEO 0
 #   define VLC_THREAD_PRIORITY_OUTPUT 0
 
 #endif
@@ -105,15 +114,15 @@ typedef struct
 } vlc_cond_t;
 
 #elif defined( ST_INIT_IN_ST_H )
-typedef st_thread_t *    vlc_thread_t;
+typedef st_thread_t      vlc_thread_t;
 typedef struct
 {
-    st_mutex_t mutex;
+    st_mutex_t mutex;
     vlc_object_t * p_this;
 } vlc_mutex_t;
 typedef struct
 {
-    st_cond_t cond;
+    st_cond_t cond;
     vlc_object_t * p_this;
 } vlc_cond_t;