Uh oh!
There was an error while loading. Please reload this page.
Haiku: Initial managed libraries support - #121880
Conversation
540d8bb to
f20b31cCompareThere was a problem hiding this comment.
Pull request overview
This PR adds initial managed libraries support for Haiku OS by implementing the necessary interop and environment code for System.Private.CoreLib. The changes enable basic Haiku platform detection and working set memory queries.
- Adds Haiku OS platform detection with TARGET_HAIKU constant
- Implements WorkingSet property for Haiku using native area_info API
- Provides comprehensive Haiku OS interop definitions (teams, threads, areas, system info)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs | Adds TARGET_HAIKU constant to platform name detection |
| src/libraries/System.Private.CoreLib/src/System/Environment.Haiku.cs | Implements WorkingSet property for Haiku by iterating process memory areas |
| src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems | Configures conditional compilation for Haiku and includes required interop files |
| src/libraries/Common/src/Interop/Haiku/Interop.OS.cs | Defines comprehensive Haiku OS interop structures, enums, and P/Invoke methods for process/thread/memory management |
| src/libraries/Common/src/Interop/Haiku/Interop.Libraries.cs | Defines libroot library constant for Haiku interop |
Comments suppressed due to low confidence (3)
src/libraries/Common/src/Interop/Haiku/Interop.OS.cs:209
- The parameter documentation is incorrect. The
whoparameter is of typeBTeamUsage(an enum specifying self or children), not "The thread ID". It should describe that this parameter specifies whether to get usage information for the team itself or its children.
src/libraries/Common/src/Interop/Haiku/Interop.OS.cs:252 - The parameter documentation should use
<see cref="system_info"/>instead of just "system_info" for consistency with other parameter documentation in this file (e.g., lines 159, 170, 181, 210, 230, 242).
src/libraries/Common/src/Interop/Haiku/Interop.OS.cs:86 - The enum name
thread_stateuses snake_case which is inconsistent with C# naming conventions and the pattern used by other enums in this file (BTeamUsage,BPriority). It should be renamed toThreadStateto follow PascalCase naming convention.
trungnt2910
commented
Nov 21, 2025
C/c @am11 Haiku's |
am11
commented
Nov 21, 2025
Each library has its own review team, and they’ll use your tests as a measure of correctness while providing feedback mainly on efficiency and code style. The individual PRs don’t need to build (there’s no Haiku CI here). You could open two or three PRs in parallel if you want to speed up the upstream process (since you already have these patches in your fork tested for a while). |
trungnt2910
commented
Nov 21, 2025
What I meant was the two share a common file, |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
trungnt2910
commented
Feb 17, 2026
Still tracking, will take action soon. |
trungnt2910
commented
Apr 6, 2026
Thanks for the reminder, and sorry for the delay. I will take action as soon as I can. |
f20b31c to
265e06bCompare265e06b to
acf2867CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
trungnt2910
commented
Apr 9, 2026
Local Haiku bootstrap builds are succeeding (after also applying #126701 and making some The CI failures seem like unrelated WASM/Android targets. Most targets are passing. Therefore, I am marking this PR for review again. |
Uh oh!
There was an error while loading. Please reload this page.
acf2867 to
eef1222CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This contains the code required to build the first managed runtime libraries for Haiku, namely `System.Private.CoreLib`. Co-authored-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
eef1222 to
54ada29CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This contains the code required to build the first managed runtime libraries for Haiku, namely
System.Private.CoreLib.Part of #55803.