mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-24 01:09:47 +08:00
The POSIX mq_send() function currently passes timeout=0 to rt_mq_send_wait_prio(), causing it to return immediately when the queue is full instead of blocking as required by POSIX.1-2017. This patch: 1. Changes mq_send() to use RT_WAITING_FOREVER for blocking behavior 2. Implements mq_timedsend() properly with timeout support 3. Fixes errno mapping for different error conditions Reference: POSIX.1-2017 mq_send(3p): "If the specified message queue is full, mq_send() shall block until space becomes available to enqueue the message, or until mq_send() is interrupted by a signal." Fixes: https://github.com/RT-Thread/rt-thread/issues/11196 Signed-off-by: hzt <3061613175@qq.com>