[vlc-devel] [PATCH] posix: add missing cancellation point
RĂ©mi Denis-Courmont
remi at remlab.net
Wed Feb 26 20:28:14 CET 2020
---
src/posix/wait.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/posix/wait.c b/src/posix/wait.c
index 26bce27448..a6d58d721b 100644
--- a/src/posix/wait.c
+++ b/src/posix/wait.c
@@ -83,6 +83,8 @@ void vlc_atomic_wait(void *addr, unsigned value)
if (value == atomic_load_explicit(futex, memory_order_relaxed))
pthread_cond_wait(&bucket->wait, &bucket->lock);
+ else
+ pthread_testcancel();
pthread_cleanup_pop(1);
}
@@ -98,6 +100,8 @@ static int vlc_atomic_timedwait_timespec(void *addr, unsigned value,
if (value == atomic_load_explicit(futex, memory_order_relaxed))
ret = pthread_cond_timedwait(&bucket->wait, &bucket->lock, ts);
+ else
+ pthread_testcancel();
pthread_cleanup_pop(1);
return ret;
--
2.25.1
More information about the vlc-devel
mailing list