[vlc-commits] linux: remove cancellation in vlc_atomic_wait()

Rémi Denis-Courmont git at videolan.org
Fri Apr 17 18:51:17 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Apr 14 22:24:47 2020 +0300| [f162df952ea7a51cbc6bd85a14cb398ee7b1bdfb] | committer: Rémi Denis-Courmont

linux: remove cancellation in vlc_atomic_wait()

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

 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)



More information about the vlc-commits mailing list