From d44790c8f928012c4e3b7390afc99f3a8423df8b Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Fri, 18 May 2018 19:59:30 +0800 Subject: [PATCH] =?UTF-8?q?[src/ipc.c]adjust=20rt=5Fevent=5Fsend()=20hook?= =?UTF-8?q?=20function=20position|=E8=B0=83=E6=95=B4rt=5Fevent=5Fsend()?= =?UTF-8?q?=E9=92=A9=E5=AD=90=E5=87=BD=E6=95=B0=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ipc.c b/src/ipc.c index dbf0881b02..5aed193996 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1013,7 +1013,6 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set) return -RT_ERROR; need_schedule = RT_FALSE; - RT_OBJECT_HOOK_CALL(rt_object_put_hook, (&(event->parent.parent))); /* disable interrupt */ level = rt_hw_interrupt_disable(); @@ -1021,6 +1020,8 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set) /* set event */ event->set |= set; + RT_OBJECT_HOOK_CALL(rt_object_put_hook, (&(event->parent.parent))); + if (!rt_list_isempty(&event->parent.suspend_thread)) { /* search thread list to resume thread */