summaryrefslogtreecommitdiff
path: root/src/ipc.c
diff options
context:
space:
mode:
authorzms123456 <[email protected]>2024-09-12 06:03:43 +0800
committerGitHub <[email protected]>2024-09-11 18:03:43 -0400
commit08221b54d0077b09fabb18dca421795301fa29ae (patch)
tree471aaa16614517d231fc19bffce803d805ebe7e8 /src/ipc.c
parentf9b632d52d07d668405909bdc8a6201cf6891e88 (diff)
[kernel][mutex] fix bug of thread exit without releasing mutex & add error check log
Diffstat (limited to 'src/ipc.c')
-rw-r--r--src/ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipc.c b/src/ipc.c
index fd8e9c66bf..4cea8d8a51 100644
--- a/src/ipc.c
+++ b/src/ipc.c
@@ -1351,7 +1351,7 @@ static rt_err_t _rt_mutex_take(rt_mutex_t mutex, rt_int32_t timeout, int suspend
if (mutex->owner == thread)
{
- if(mutex->hold < RT_MUTEX_HOLD_MAX)
+ if (mutex->hold < RT_MUTEX_HOLD_MAX)
{
/* it's the same thread */
mutex->hold ++;