You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "TaiJuWu (via GitHub)" <gi...@apache.org> on 2023/09/12 02:13:16 UTC

[GitHub] [nuttx] TaiJuWu commented on a diff in pull request #10593: Check mutex holder and releaser are same thread

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.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org