<div dir="ltr">Yes my question was the first that you mentioned! (Do you mean whether libslirp can happen to call tftp_input twice at<br><div>
the same time?)</div><div><br></div><div>Cheers<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Στις Τρί 17 Μαΐ 2022 στις 1:59 π.μ., ο/η Samuel Thibault <<a href="mailto:samuel.thibault@aquilenet.fr">samuel.thibault@aquilenet.fr</a>> έγραψε:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Michail T, le mar. 15 févr. 2022 22:01:24 +0200, a ecrit:<br>
> I would like to ask if it would be possible that tftp_input() is called twice<br>
> at the same time?<br>
<br>
I'm not sure what you mean exactly.<br>
<br>
Do you mean whether libslirp can happen to call tftp_input twice at<br>
the same time? Or do you mean whether the tftp_input function is safe<br>
against being called twice at the same time? It'd probably be good that<br>
you explain your situation, otherwise we're probably in an XY problem.<br>
<br>
Generally speaking, libslirp is thread-unsafe: there is global state in<br>
the slirp variable and yet no single mention of thread calls. So it's<br>
unsafe to call slirp_input several times concurrently for the same slirp<br>
state. As for tftp's tftp_input, tftp_session_allocate clearly shows<br>
that it's unsafe against concurrency.<br>
<br>
Samuel<br>
</blockquote></div>