Explorar o código

Update ipc.c

程序的分支逻辑出错。
详见修改。
greed-island %!s(int64=5) %!d(string=hai) anos
pai
achega
08c15f1b11
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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
     {