[LTP] [PATCH v2] fzsync: break inf loop with flag vs pthread_cancel
Richard Palethorpe
rpalethorpe@suse.de
Tue Apr 12 11:40:57 CEST 2022
Hello Edward and Li,
Li Wang <liwang@redhat.com> writes:
> 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>
Awesome. Merged with some indentation fixes, it seems like you editor
used tab for the first indent then spaces thereafter.
--
Thank you,
Richard.
More information about the ltp
mailing list