diff options
| author | zhkag <[email protected]> | 2023-07-24 17:01:45 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-24 17:01:45 +0800 |
| commit | 7e5620edc3a8a8f3cccc75fab6dd8b05156256ed (patch) | |
| tree | 7a472803aab090eefc8aee4f9d5644bdbbc371d0 /components/libc | |
| parent | 27143f4138968efdab3d43f5943c738debb31e78 (diff) | |
[smart] 修复用户态 mq_receive 不能阻塞 (#7836)
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/posix/ipc/mqueue.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/libc/posix/ipc/mqueue.c b/components/libc/posix/ipc/mqueue.c index 72b6c5b8f7..45a1382313 100644 --- a/components/libc/posix/ipc/mqueue.c +++ b/components/libc/posix/ipc/mqueue.c @@ -180,6 +180,8 @@ ssize_t mq_timedreceive(mqd_t id, } if (abs_timeout != RT_NULL) tick = rt_timespec_to_tick(abs_timeout); + else + tick = RT_WAITING_FOREVER; result = rt_mq_recv_prio(mq, msg_ptr, msg_len, (rt_int32_t *)msg_prio, tick, RT_UNINTERRUPTIBLE); |
