Skip to content

PCA20035 pilot v0.1.0-rc3

Pre-release
Pre-release
Compare
Choose a tag to compare
@jtguggedal jtguggedal released this 26 Mar 11:30
· 37 commits to pca20035_pilot_rc1 since this release
lib: bsdlib: Add upper limit on timeout in bsd_os_timedwait

A race occurs when a context calls bsd_os_timedwait to start
waiting for an event on its socket. The event can happen
between checking the event and blocking the thread. If it does,
the RPC interrupt that was supposed to give the semaphore has
has already fired before the semaphore was initialized and taken.
Returning back to bsdlib after some maxmum period (currently
500 ms) avoids blocking forever, at the cost of some extra
cycles checking in bsdlib if we missed the event every 500 ms.

Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>