[vlc-devel] [PATCH 5/7] linux: remove cancellation in vlc_atomic_wait()

RĂ©mi Denis-Courmont remi at remlab.net
Tue Apr 14 21:45:42 CEST 2020


---
 src/linux/thread.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/src/linux/thread.c b/src/linux/thread.c
index fa8d0e4c26..bd2596bade 100644
--- a/src/linux/thread.c
+++ b/src/linux/thread.c
@@ -63,18 +63,8 @@ static int vlc_futex_wake(void *addr, int nr)
 static int vlc_futex_wait(void *addr, unsigned flags,
                           unsigned val, const struct timespec *to)
 {
-    int ret;
-
-#ifndef __ANDROID__
-    int type;
-    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &type);
-#endif
-    ret = sys_futex(addr, FUTEX_WAIT_BITSET_PRIVATE | flags, val, to, NULL,
-                    FUTEX_BITSET_MATCH_ANY);
-#ifndef __ANDROID__
-    pthread_setcanceltype(type, NULL);
-#endif
-    return ret;
+    return sys_futex(addr, FUTEX_WAIT_BITSET_PRIVATE | flags, val, to, NULL,
+                     FUTEX_BITSET_MATCH_ANY);
 }
 
 void vlc_atomic_notify_one(void *addr)
-- 
2.26.0



More information about the vlc-devel mailing list