[LTP] [PATCH v2] fzsync: break inf loop with flag vs pthread_cancel
Li Wang
liwang@redhat.com
Tue Apr 12 04:40:58 CEST 2022
On Mon, Apr 11, 2022 at 11:17 PM Edward Liaw via ltp <ltp@lists.linux.it>
wrote:
Hi, I'm working to get fzsync working with the Android kernel, which
> does not have pthread_cancel available.
>
> In the absence of pthread_cancel, when thread A exits due to a break,
> thread B will get stuck in an infinite loop while waiting for thread A
> to progress.
>
> Instead of cancelling thread B, we can use the exit flag to break out of
> thread B's loop. This should also remove the need for the wrapper
> around the thread.
>
> Signed-off-by: Edward Liaw <edliaw@google.com>
>
Reviewed-by: Li Wang <liwang@redhat.com>
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220412/63be0364/attachment.htm>
More information about the ltp
mailing list