I am using the BSP serial port read() function in blocking mode.
I would like to “wake-up”/terminate the read from another thread to handle a graceful shutdown. I tried using the API:
with no luck.
I found on the forum someone suggested modifying the BSP in the following thread:
However this thread is quite old and the BSP has been changed so this suggestion is out-dated. I also prefer not to modify the BSP from a maintenance perspective.
I know I can handle this various ways, one of which is to switch to a non-blocking mode and using something like:
to do check for valid input, or even use the select(…) function.
I also prefer not to do this as the blocking read() is an elegant solution from a threading point of view, I just need to handle the fringe case of waking it up.
Has anything been added to NET+OS to allow terminating the read() function?
Thanks in advance.