Browse Source

Update ipc.c

程序的分支逻辑出错。
详见修改。
greed-island 5 years ago
parent
commit
08c15f1b11
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/ipc.c

+ 5 - 0
src/ipc.c

@@ -1186,6 +1186,11 @@ 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
     {