TaiJuWu commented on code in PR #10593:
URL: https://github.com/apache/nuttx/pull/10593#discussion_r1322280405
##########
libs/libc/misc/lib_mutex.c:
##########
@@ -337,6 +337,7 @@ int nxmutex_unlock(FAR mutex_t *mutex)
}
DEBUGASSERT(nxmutex_is_hold(mutex));
+ ASSERT(mutex->holder == _SCHED_GETTID());
Review Comment:
Sorry, based on the name of the function, I guess it's just that someone got
this mutex but does not check the holder and caller is the same guy.
And I think the check should be added in product mode.
What do you think?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]