[vlc-devel] [PATCH] posix: add missing cancellation point

Thomas Guillem thomas at gllm.fr
Thu Feb 27 10:15:50 CET 2020


LGTM

On Wed, Feb 26, 2020, at 20:28, RĂ©mi Denis-Courmont wrote:
> ---
>  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
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list