diff --git a/src/ipc.c b/src/ipc.c index 7e4263c0bf9de40ad8b0102e6f36c9fc27ca377d..0ad50bfbc533f16c1cec5fe865428b936ff296cb 100644 --- a/src/ipc.c +++ b/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();