<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 11, 2022 at 11:17 PM Edward Liaw via ltp <<a href="mailto:ltp@lists.linux.it">ltp@lists.linux.it</a>> wrote:<br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi, I'm working to get fzsync working with the Android kernel, which<br>
does not have pthread_cancel available.<br>
<br>
In the absence of pthread_cancel, when thread A exits due to a break,<br>
thread B will get stuck in an infinite loop while waiting for thread A<br>
to progress.<br>
<br>
Instead of cancelling thread B, we can use the exit flag to break out of<br>
thread B's loop.  This should also remove the need for the wrapper<br>
around the thread.<br>
<br>
Signed-off-by: Edward Liaw <<a href="mailto:edliaw@google.com" target="_blank">edliaw@google.com</a>><br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Reviewed-by: Li Wang <<a href="mailto:liwang@redhat.com">liwang@redhat.com</a>></div><div class="gmail_default" style="font-size:small"><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>