[vlc-commits] darwin threads: add missing cancellation point
Felix Paul Kühne
git at videolan.org
Wed Jul 1 14:28:52 CEST 2015
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jul 1 14:28:26 2015 +0200| [910e208252ae96848bf2339ea4386fe4544d23dd] | committer: Felix Paul Kühne
darwin threads: add missing cancellation point
This solves timer cancellation issues on Darwin 11 and later
Thanks to Sean for the hint
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=910e208252ae96848bf2339ea4386fe4544d23dd
---
src/darwin/thread.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/darwin/thread.c b/src/darwin/thread.c
index 8b1c29d..f397318 100644
--- a/src/darwin/thread.c
+++ b/src/darwin/thread.c
@@ -355,6 +355,10 @@ int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
* For more details, see: https://devforums.apple.com/message/931605
*/
+ /* according to POSIX standards, cond_timedwait should be a cancellation point
+ * Of course, Darwin does not care */
+ pthread_testcancel();
+
if (p_condvar->clock == VLC_CLOCK_MONOTONIC) {
/*
More information about the vlc-commits
mailing list