Repository navigation
Conversation
The holder of a mutex lives in the low 31 bits of sem.val.mholder, with bit 31 as the blocking flag; mutex_t no longer carries a holder field of its own. Read it through a sem_t with the blocking bit masked in thread.py, both in the thread listing and in ps, and add the helper to utils. Signed-off-by: anjiahao <anjiahao@xiaomi.com>
jerpelea
approved these changes
Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A mutex holder is stored in the low 31 bits of
sem.val.mholder, withbit 31 as the blocking flag;
mutex_tno longer carries a holder field ofits own. Read it through a
sem_tand mask the blocking bit in thethread listing and in
ps, instead of casting tomutex_tand reading aholdermember that no longer exists. The helper is added toutils.Impact
tools/pynuttx/nxgdb/thread.pyandtools/pynuttx/nxgdb/utils.pyonly;both commands are changed to read the value the C code actually stores.
Testing
tools/checkpatch.sh -c -u -mpasses.python3 -m py_compile tools/pynuttx/nxgdb/thread.py tools/pynuttx/nxgdb/utils.pypasses.