]> git.sesse.net Git - vlc/blobdiff - include/vlc_threads.h
vlc_mutex_trylock() return value must be checked
[vlc] / include / vlc_threads.h
index 4057f65d6809a1f97dc6c92a8e110d869782455b..52157d8c287d2382f30d97cf30dc4243991ad51c 100644 (file)
@@ -128,7 +128,7 @@ typedef struct
 #define VLC_STATIC_MUTEX { 0, }
 
 typedef HANDLE  vlc_cond_t;
-typedef struct vlc_threadvar *vlc_threadvar_t;
+typedef DWORD   vlc_threadvar_t;
 
 #endif
 
@@ -143,7 +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( int,  vlc_mutex_trylock, ( vlc_mutex_t * ) LIBVLC_USED );
 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 * ) );
@@ -335,7 +335,7 @@ static inline int vlc_spin_init (vlc_spinlock_t *spin)
 #endif
 static inline void barrier (void)
 {
-#if defined (__GNUC__) && \
+#if defined (__GNUC__) && !defined (__APPLE__) && \
             ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
     __sync_synchronize ();
 #elif defined(__APPLE__)