Move MethodContextReader to use the minipal mutex#117685
Merged
jkoritzinsky merged 2 commits intodotnet:mainfrom Jul 16, 2025
Merged
Move MethodContextReader to use the minipal mutex#117685jkoritzinsky merged 2 commits intodotnet:mainfrom
jkoritzinsky merged 2 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes synchronization in the SuperPMI tool by replacing Win32 PAL mutex usage with the minipal mutex implementation. This change removes one of the remaining dependencies on Win32 PAL mutex in native code, likely improving portability and consistency with the broader runtime codebase.
Key changes:
- Replace Win32 HANDLE-based mutex with minipal_mutex type
- Update mutex initialization, destruction, and locking operations to use minipal APIs
- Simplify the AcquireLock method by removing error handling since minipal_mutex_enter doesn't fail
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| methodcontextreader.h | Updates mutex member variable type and adds minipal/mutex.h include |
| methodcontextreader.cpp | Replaces Win32 mutex APIs with minipal equivalents in constructor, destructor, and lock methods |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
AaronRobinsonMSFT
approved these changes
Jul 15, 2025
AaronRobinsonMSFT
approved these changes
Jul 15, 2025
jakobbotsch
approved these changes
Jul 16, 2025
Member
Author
|
/ba-g failures unrelated |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Removes one of the few remaining usages of the Win32 PAL Mutex in native code.