[vlc-devel] [PATCH] timer: add a few explicit cancellation points
Francois Cartegnie
fcvlcdev at free.fr
Tue Aug 19 03:41:57 CEST 2014
Le 19/08/2014 06:48, Sean McGovern a écrit :
> for (;;)
> {
> - while (timer->value == 0)
> + vlc_testcancel();
> + while (timer->value == 0) {
> vlc_cond_wait (&timer->reschedule, &timer->lock);
> + vlc_testcancel();
cond wait is already cancellation point.
> + }
>
> if (vlc_cond_timedwait (&timer->reschedule, &timer->lock,
> - timer->value) == 0)
> + timer->value) == 0) {
> + vlc_testcancel();
> continue;
continue, then we have 3 cancellation points in a row.
> vlc_cancel (timer->thread);
> + vlc_cond_broadcast(&timer->reschedule);
I don't see why that thread would not exit on cancellation.
If cancellation points are broken on condwait then that behaviour should
appear somewhere else as well.
Francois
More information about the vlc-devel
mailing list