Open
Conversation
This contains the missing configuration updates required to build the native component for Haiku with the latest .NET source.
Contributor
|
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates native build configuration to improve compatibility with Haiku when building dotnet/runtime native components, primarily by feature-detecting pthread robust-mutex APIs and adjusting Haiku linker behavior in CMake.
Changes:
- Add CMake feature checks for
pthread_mutex_consistentandpthread_mutexattr_setrobust, and expose them viapal_config.h. - Conditionally compile robust-mutex initialization and recovery paths in
pal_crossprocessmutex.cbased on those feature macros. - Adjust Haiku CMake linker-group settings as a workaround for missing upstream CMake support.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/native/libs/System.Native/pal_crossprocessmutex.c | Guard robust mutex attr usage and EOWNERDEAD recovery logic behind feature macros. |
| src/native/libs/configure.cmake | Add configure-time detection for robust-mutex related pthread APIs. |
| src/native/libs/Common/pal_config.h.in | Export new HAVE_PTHREAD_MUTEX_* feature macros to native builds. |
| eng/native/configurecompiler.cmake | Set Haiku linker-group rescan settings and adjust Haiku linker flags. |
jkotas
reviewed
Apr 9, 2026
| error = pthread_mutexattr_settype(&mutexAttributes, PTHREAD_MUTEX_RECURSIVE); | ||
| assert(error == 0); | ||
|
|
||
| #if HAVE_PTHREAD_MUTEXATTR_SETROBUST |
Member
There was a problem hiding this comment.
@jkoritzinsky Is the cross-process mutex going to work without these APIs? Should Haiku use the fallback path instead?
This was referenced Apr 9, 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.
This contains the missing configuration updates required to build the native component for Haiku with the latest .NET source.
Part of #55803.