1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 16:01:18 +01:00
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
..
2017-02-16 17:11:22 +01:00
2021-02-02 22:21:14 +01:00
2019-05-02 12:09:37 +02:00
2020-10-23 00:45:56 +02:00
2020-04-21 15:10:56 +02:00
2021-02-02 22:21:14 +01:00
2020-11-06 15:57:56 +01:00
2020-04-28 13:35:05 +02:00
2021-02-02 22:21:14 +01:00
2021-11-18 15:44:00 +01:00
2021-02-02 22:21:14 +01:00
2020-03-30 17:02:08 +02:00
2020-10-23 00:45:56 +02:00
2021-02-02 22:21:14 +01:00