summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorchenchaoqun <[email protected]>2020-07-27 11:36:57 +0800
committerchenchaoqun <[email protected]>2020-07-27 11:38:46 +0800
commitb328c1cbac55d6ed9ab4708611e20961a28f27f1 (patch)
tree08edb8925e7d73eb3304f6decf8d6cfa5defbb1f /src/ipc.c
parente6b72153b440ae6eb9cf98bdc44c29903042373f (diff)
[modify] if ... else if constructs to be terminated with an else clause, which other option is invalid and delete surplus space.
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 8e8c4db842..876d8df3a1 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1080,6 +1080,13 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set)
status = RT_EOK;
}
}
+ else
+ {
+ /* enable interrupt */
+ rt_hw_interrupt_enable(level);
+
+ return -RT_EINVAL;
+ }
/* move node to the next */
n = n->next;
@@ -1186,10 +1193,10 @@ rt_err_t rt_event_recv(rt_event_t event,
{
/* no waiting */
thread->error = -RT_ETIMEOUT;
-
+
/* enable interrupt */
rt_hw_interrupt_enable(level);
-
+
return -RT_ETIMEOUT;
}
else