RFR: 8290059: Do not use std::thread in panama tests [v2]
Jorn Vernee
jvernee at openjdk.org
Tue Jul 26 14:34:22 UTC 2022
On Fri, 22 Jul 2022 16:45:55 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> This patch removes the use of std::thread from the `java.lang.foreign` tests, and switches to the OS specific thread APIs, in order to change things such as the stack size on some platforms where this is required in the future (see the JBS issue).
>>
>> This is done by adding a small header-only library that exposes a function to run code in freshly spawned threads (`run_async`).
>>
>> Testing: Running the affected tests on platforms that implement the linker.
>
> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixes
I made some tentative changes based on the review comments:
- Added some code comments.
- Switch `perror` to `fputs` with `stderr` for clarity.
- Use the OS API error code as exit code.
- Switch the windows type of `procedure` to exactly what the `CreateThread` expects: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms686736(v=vs.85)
- Renamed `run_async` to `run_in_new_thread`.
Please take another look.
-------------
PR: https://git.openjdk.org/jdk/pull/9599
More information about the build-dev
mailing list