vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sun Dec 13 11:20:33 2015 +0200| [68bbddd369b47dbe52d56a6af39a9dc7214f4ecd] | committer: Rémi Denis-Courmont
include: add VLC_THREAD_CANCELED constant macro This is the return value of a thread that has terminated due to cancelation. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=68bbddd369b47dbe52d56a6af39a9dc7214f4ecd --- include/vlc_threads.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/vlc_threads.h b/include/vlc_threads.h index 9002249..b31c885 100644 --- a/include/vlc_threads.h +++ b/include/vlc_threads.h @@ -53,6 +53,7 @@ VLC_API void vlc_testcancel(void); # endif typedef struct vlc_thread *vlc_thread_t; +#define VLC_THREAD_CANCELED NULL typedef struct { bool dynamic; @@ -102,6 +103,7 @@ static inline int vlc_poll(struct pollfd *fds, unsigned nfds, int timeout) # include <errno.h> typedef struct vlc_thread *vlc_thread_t; +#define VLC_THREAD_CANCELED NULL typedef struct { bool dynamic; @@ -170,6 +172,7 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout) # define LIBVLC_NEED_RWLOCK typedef struct vlc_thread *vlc_thread_t; +#define VLC_THREAD_CANCELED NULL typedef pthread_mutex_t vlc_mutex_t; #define VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER @@ -221,6 +224,7 @@ static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout) # define LIBVLC_USE_PTHREAD_CLEANUP 1 typedef pthread_t vlc_thread_t; +#define VLC_THREAD_CANCELED PTHREAD_CANCELED typedef pthread_mutex_t vlc_mutex_t; #define VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER typedef struct @@ -263,6 +267,11 @@ typedef struct vlc_timer *vlc_timer_t; typedef pthread_t vlc_thread_t; /** + * Return value of a canceled thread. + */ +#define VLC_THREAD_CANCELED PTHREAD_CANCELED + +/** * Mutex. * * Storage space for a mutual exclusion lock. _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
