]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
Static mutexes
[vlc] / include / vlc_threads.h
index 374d01d55e25c5a25dc062371a2a0cf5cf04346b..4ab92c2d03f26c9f2094a3f465d9ba62df811f36 100644 (file)
 #if defined (LIBVLC_USE_PTHREAD)
 typedef pthread_t       vlc_thread_t;
 typedef pthread_mutex_t vlc_mutex_t;
+#define VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER
 typedef pthread_cond_t  vlc_cond_t;
 typedef pthread_key_t   vlc_threadvar_t;
 
@@ -119,8 +120,10 @@ typedef struct
 typedef struct
 {
     CRITICAL_SECTION mutex;
-}
-vlc_mutex_t;
+    LONG initialized;
+} vlc_mutex_t;
+#define VLC_STATIC_MUTEX { .initialized = 0, }
+
 typedef HANDLE  vlc_cond_t;
 typedef DWORD   vlc_threadvar_t;