]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
Win32: emulate static mutexes with a boolean (fix: #2399)
[vlc] / include / vlc_threads.h
index 1f69541eb1695bd24c63c6600039c05051a9341d..65a4eb4807703f8140f01ff874ea7cc60baf7d85 100644 (file)
@@ -124,10 +124,14 @@ typedef struct
 
 typedef struct
 {
-    LONG initialized;
-    CRITICAL_SECTION mutex;
+    bool dynamic;
+    union
+    {
+        bool locked;
+        CRITICAL_SECTION mutex;
+    };
 } vlc_mutex_t;
-#define VLC_STATIC_MUTEX { 0, }
+#define VLC_STATIC_MUTEX { false, { false } }
 
 typedef HANDLE  vlc_cond_t;
 typedef HANDLE  vlc_sem_t;