Hi Simon,

I am calling only sntp_setservername and sntp_init from my code.

sntp_setservername is fairly benign and more or less atomic on my platform.

sntp_init though calls sntp_request, which calls sntp_send_request etc.
these functions in turn can call sys_timeout which could corrupt the
timeout linked list if another thread happened to be in a critical part of
code at the same time.

I concede I might be too paranoid, but I'd rather look stupid asking the
question than not :)



On Fri, Sep 22, 2017 at 2:16 PM, Simon Goldschmidt <goldsi...@gmx.de> wrote:

> Wayne Uroda wrote:
> > This got me to thinking, are the SNTP functions (such as sntp_init)
> meant to be called only from a particular thread, namely the tcpip_thread?
>
> Yes.
>
> > Every other lwip function I've used has a wrapper which invokes
> functions on the tcpip thread via the mailbox mechanism.
>
> Well, things in src/api is meant to be called from other threads. All the
> rest is single-threaded only. Sadly, this might not be clearly visible from
> the include file structure...
>
> Which functions are you talking about?
>
>
> Simon
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to