lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Correct way to use SNTP safely


From: Wayne Uroda
Subject: [lwip-users] Correct way to use SNTP safely
Date: Fri, 22 Sep 2017 11:32:46 +1000

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]