summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2013-10-14 16:23:43 -0700
committerBernard Xiong <[email protected]>2013-10-14 16:23:43 -0700
commit28caaecee36676cae025bdae298c16f287f427fc (patch)
treefddd81c8ef3c78852b51bcd0f4863c629801bb0d /src/ipc.c
parentca9b83c68fcc2b841400a5f4c7728a111582ffb7 (diff)
parentb72001fcac18d2c37c24e423cc7e15fe900dc172 (diff)
Merge pull request #174 from grissiom/rtt-next
kernel: mutex could only be released in thread context
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipc.c b/src/ipc.c
index 7e4263c0bf..0ad50bfbc5 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();