4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-22 13:38:07 +08:00

Merge pull request #174 from grissiom/rtt-next

kernel: mutex could only be released in thread context
This commit is contained in:
Bernard Xiong 2013-10-14 16:23:43 -07:00
commit 28caaecee3

View File

@ -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();