I have been looking at how SNTP works, as I want to allow the user to change the SNTP_UPDATE_DELAY somewhat dynamically (I understand I will need to enforce minimum 15 seconds between requests).
It got me thinking about how sys_timeout works. This function manipulates a linked list in timers.c. I can't see any task safety/locking around manipulating that linked list.
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?
Every other lwip function I've used has a wrapper which invokes functions on the tcpip thread via the mailbox mechanism. Is SNTP lacking this feature, or am I just doing something wrong?
Any help is appreciated
Thanks
- Wayne