[vlc-commits] darwin threads: add missing cancellation point

Felix Paul Kühne git at videolan.org
Wed Jul 1 19:36:14 CEST 2015


vlc/vlc-2.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jul  1 14:28:26 2015 +0200| [43f344559cfd676b0c2f70234c335267bff0f208] | 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

(cherry picked from commit 910e208252ae96848bf2339ea4386fe4544d23dd)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=43f344559cfd676b0c2f70234c335267bff0f208
---

 src/darwin/thread.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/darwin/thread.c b/src/darwin/thread.c
index cd1d694..bb0b771 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