Explorar o código

Merge pull request #174 from grissiom/rtt-next

kernel: mutex could only be released in thread context
Bernard Xiong %!s(int64=12) %!d(string=hai) anos
pai
achega
28caaecee3
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/ipc.c

+ 3 - 0
src/ipc.c

@@ -777,6 +777,9 @@ rt_err_t rt_mutex_release(rt_mutex_t mutex)
 
     need_schedule = RT_FALSE;
 
+    /* only thread could release mutex because we need test the ownership */
+    RT_DEBUG_IN_THREAD_CONTEXT;
+
     /* get current thread */
     thread = rt_thread_self();