]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
Fix configure for Win32 on OpenGL detection
[vlc] / include / vlc_threads.h
index 8fa2cf0906ef20cfa621acc00fae1ceb954edd85..3fefbaf2dfbbebffa7821c595a0b30b8123793d4 100644 (file)
@@ -111,6 +111,7 @@ typedef pthread_mutex_t vlc_mutex_t;
 typedef pthread_cond_t  vlc_cond_t;
 #define VLC_STATIC_COND  PTHREAD_COND_INITIALIZER
 typedef pthread_rwlock_t vlc_rwlock_t;
+#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
 typedef pthread_key_t   vlc_threadvar_t;
 typedef struct vlc_timer *vlc_timer_t;
 
@@ -143,18 +144,20 @@ typedef struct
     HANDLE   handle;
     unsigned clock;
 } vlc_cond_t;
+#define VLC_STATIC_COND { 0, 0 }
 
 typedef HANDLE  vlc_sem_t;
 
 typedef struct
 {
     vlc_mutex_t   mutex;
-    vlc_cond_t    read_wait;
-    vlc_cond_t    write_wait;
+    vlc_cond_t    wait;
     unsigned long readers;
     unsigned long writers;
     DWORD         writer;
 } vlc_rwlock_t;
+#define VLC_STATIC_RWLOCK \
+    { VLC_STATIC_MUTEX, VLC_STATIC_COND, 0, 0, 0 }
 
 typedef struct vlc_threadvar *vlc_threadvar_t;
 typedef struct vlc_timer *vlc_timer_t;
@@ -207,8 +210,7 @@ VLC_API void msleep(mtime_t delay);
 #define VLC_HARD_MIN_SLEEP   10000 /* 10 milliseconds = 1 tick at 100Hz */
 #define VLC_SOFT_MIN_SLEEP 9000000 /* 9 seconds */
 
-#if defined (__GNUC__) \
- && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#if VLC_GCC_VERSION(4,3)
 /* Linux has 100, 250, 300 or 1000Hz
  *
  * HZ=100 by default on FreeBSD, but some architectures use a 1000Hz timer
@@ -480,6 +482,8 @@ enum {
    VLC_AVCODEC_MUTEX = 0,
    VLC_GCRYPT_MUTEX,
    VLC_XLIB_MUTEX,
+   VLC_MOSAIC_MUTEX,
+   VLC_HIGHLIGHT_MUTEX,
    /* Insert new entry HERE */
    VLC_MAX_MUTEX
 };