]> git.sesse.net Git - vlc/commitdiff
Define VLC_STATIC_RWLOCK
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 18 Aug 2011 14:18:16 +0000 (17:18 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 18 Aug 2011 14:07:14 +0000 (17:07 +0300)
include/vlc_threads.h

index f7a91a8f8b99e80da37d7e85347c084148d01c64..dfe43599f7ceb74f217c54ea8dbbf8b24b875536 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;
 
@@ -155,6 +156,8 @@ typedef struct
     unsigned long writers;
     DWORD         writer;
 } vlc_rwlock_t;
+#define VLC_STATIC_RWLOCK \
+    { VLC_STATIC_MUTEX, VLC_STATIC_COND, VLC_STATIC_COND, 0, 0, 0 }
 
 typedef struct vlc_threadvar *vlc_threadvar_t;
 typedef struct vlc_timer *vlc_timer_t;