]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
Remove uneeded exceptions
[vlc] / include / vlc_threads.h
index c9908321cf8b49b481186ffc9132df4da42763ea..6a6bacada2fcedc20603a2e121201533b918b063 100644 (file)
@@ -122,10 +122,10 @@ typedef struct
 
 typedef struct
 {
-    CRITICAL_SECTION mutex;
     LONG initialized;
+    CRITICAL_SECTION mutex;
 } vlc_mutex_t;
-#define VLC_STATIC_MUTEX { .initialized = 0, }
+#define VLC_STATIC_MUTEX { 0, }
 
 typedef HANDLE  vlc_cond_t;
 typedef DWORD   vlc_threadvar_t;
@@ -143,6 +143,7 @@ VLC_EXPORT( int,  vlc_mutex_init,    ( vlc_mutex_t * ) );
 VLC_EXPORT( int,  vlc_mutex_init_recursive, ( vlc_mutex_t * ) );
 VLC_EXPORT( void, vlc_mutex_destroy, ( vlc_mutex_t * ) );
 VLC_EXPORT( void, vlc_mutex_lock, ( vlc_mutex_t * ) );
+VLC_EXPORT( int, vlc_mutex_trylock, ( vlc_mutex_t * ) );
 VLC_EXPORT( void, vlc_mutex_unlock, ( vlc_mutex_t * ) );
 VLC_EXPORT( int,  vlc_cond_init,     ( vlc_cond_t * ) );
 VLC_EXPORT( void, vlc_cond_destroy,  ( vlc_cond_t * ) );