From: RĂ©mi Denis-Courmont Date: Sun, 10 Aug 2008 18:43:05 +0000 (+0300) Subject: Cleanup helper for unlocking X-Git-Tag: 1.0.0-pre1~3758 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7783a1cec9d1ac33b81c181da859dc1d6fc7cf9a;p=vlc Cleanup helper for unlocking --- diff --git a/include/vlc_threads.h b/include/vlc_threads.h index e044e56d0a..c6be0eacdd 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -373,6 +373,12 @@ struct vlc_cleanup_t #endif /* LIBVLC_USE_PTHREAD */ +static inline void vlc_cleanup_lock (void *lock) +{ + vlc_mutex_unlock ((vlc_mutex_t *)lock); +} +#define mutex_cleanup_push( lock ) vlc_cleanup_push (vlc_cleanup_lock, lock) + /***************************************************************************** * vlc_cond_init: initialize a condition *****************************************************************************/