mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-23 12:15:32 +08:00
[Kernel] message 可以返回消息的实际大小 (#7709)
This commit is contained in:
@@ -74,7 +74,7 @@ void rt_init_thread_entry(void *parameter)
|
||||
|
||||
while(1)
|
||||
{
|
||||
if (rt_mq_recv(&mq, &msg, sizeof(msg), RT_WAITING_FOREVER) == RT_EOK)
|
||||
if (rt_mq_recv(&mq, &msg, sizeof(msg), RT_WAITING_FOREVER) >= 0)
|
||||
{
|
||||
switch(msg.type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user