Merge pull request #1447 from Guozhanxin/imx1052

adjust rt_event_send() hook function position
This commit is contained in:
Bernard Xiong 2018-05-20 00:03:12 +08:00 committed by GitHub
commit 9aba5dd6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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 */