Commit Graph

2 Commits

Author SHA1 Message Date
TaiJu Wu
d361ec9692 kernel: message does not execute correct put front behavior
When the buffer is full, Thread A gets pended (blocked).
If Thread B later calls the get function, it will unpend Thread A,
allowing it to resume and put the message into the queue.
In this situation, we need to know whether Thread A should
continue with put to front or put to end.

In order to resolve this issue, we don't allow set timeout
parameter for `k_msgq_put_front` and this parameter is always
`K_NO_WAIT`.

Signed-off-by: TaiJu Wu <tjwu1217@gmail.com>
2025-09-13 21:22:52 -04:00
Alexander Paschoaletto
34efba28b1 sample: msgq: adding a sample code for message queue base usage
this commit adds a sample code to illustrate the base usage
of message queues. a producer and a consumer thread work
together, exchanging messages in a FIFO (for normal payloads)
and LIFO (for higher priority payloads) schemes.

Signed-off-by: Alexander Paschoaletto <axelpinheiro@gmail.com>
2025-07-25 08:16:58 -04:00