Files
rt-thread/components
hzt 1b39e04687 [libc/posix] Fix mq_send() to block when queue is full per POSIX standard
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>
2026-02-24 13:39:05 +08:00
..