1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/msg_avail
Benjamin Valentin b5ea78ad47 core/msg: make msg_avail() return 0 on no queue
For the caller there should be no difference if there is no message
in the queue and if there can't be a message in the queue.

The current API works as one would expect if there is a message queue,
but once called from a thread that does not have a message queue
configured, code that does

    while (msg_avail())

will end up in an infinite loop.

Remove this foot-gun from the API by making the return value of
msg_avail() independend of the availability of a message queue.
2021-11-29 12:04:16 +01:00
..
tests tests: move testrunner import up 2018-08-13 14:11:24 +02:00
main.c core/msg: make msg_avail() return 0 on no queue 2021-11-29 12:04:16 +01:00
Makefile tests: remove uneeded DISABLE_MODULE+=auto_init 2020-02-12 16:51:34 +01:00