[Kernel] message 可以返回消息的实际大小 (#7709)

This commit is contained in:
zhkag
2023-06-21 18:22:42 +08:00
committed by GitHub
parent b4e59bac4e
commit 33f550cb65
18 changed files with 73 additions and 56 deletions
+1 -1
View File
@@ -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)
{