Skip to content
Commit de168b9b authored by Alberto Escolar Piedras's avatar Alberto Escolar Piedras Committed by Anas Nashif
Browse files

native_posix: timer: Ignore nanosleep return



Explicitly ignore the nanosleep() return value.
nanosleep() is called to slow down native_posix in real time
mode.
There is no real reason to handle this call returning too early:
The call may return earlier if a signal was sent to the process
(e.g. the user pressed Ctrl+C), or in case of errors.
In case of SIGKILL, SIGTERM, what we do is what we should do
(not wait, but terminate the program as requested by the user ASAP)
In case of another signal, we will wait the appropriate
amount of time in the next systick (so we won't accumulate any
error over time)
So there is no real need to add extra code here to handle
those cases.

Solves coverity CID 211046

Signed-off-by: default avatarAlberto Escolar Piedras <alpi@oticon.com>
parent 11afec76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment