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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kouvel Do we still need
HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES
? It does not look right that it is architecture specific.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was introduced due to a couple of issues, one in Alpine Linux and one in glibc on ARM/ARM64, but I believe that both have since been fixed. I'm not sure why the cache value is being set based on architecture, it should probably be checked based on the target OS, which is currently done in
mutex.hpp
in the PAL.It was noted in #82380 (comment) that a PAL test for named mutexes fails when pthread robust mutexes are used on RISC-V, so I wonder if it actually works. @JongHeonChoi, have you checked if the corresponding test case in
runtime/src/coreclr/pal/src/configure.cmake
Lines 1012 to 1199 in e235aef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kouvel Yes. I checked the return value(
result >= 0 ? result : 0;
) of the test case in VisionFive2 target.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, thanks! I'll look into whether this check can be removed, as I'm not aware of any current cases where it would fail.