From 1fe077a0be8636a3aeb39b897373f493da06f9c6 Mon Sep 17 00:00:00 2001 From: Meco <920369182@qq.com> Date: Wed, 29 Jul 2020 09:57:32 +0800 Subject: [PATCH] =?UTF-8?q?fix=E5=9C=A8rt=5Fevent=5Frecv=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=BA=8B=E4=BB=B6=E5=B7=B2?= =?UTF-8?q?=E7=BB=8F=E6=BB=A1=E8=B6=B3=E6=97=A0=E9=9C=80=E9=98=BB=E5=A1=9E?= =?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=BB=99thread->event=5Fset/event=5Finfo=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ipc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ipc.c b/src/ipc.c index 8e8c4db842..c67909cfe0 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -34,6 +34,8 @@ * 2013-09-14 Grissiom add an option check in rt_event_recv * 2018-10-02 Bernard add 64bit support for mailbox * 2019-09-16 tyx add send wait support for message queue + * 2020-07-29 Meco Man fix thread->event_set/event_info when received an + event without pending */ #include @@ -1177,7 +1179,11 @@ rt_err_t rt_event_recv(rt_event_t event, /* set received event */ if (recved) *recved = (event->set & set); - + + /* fill thread event info */ + thread->event_set = (event->set & set); + thread->event_info = option; + /* received event */ if (option & RT_EVENT_FLAG_CLEAR) event->set &= ~set;