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. ------------- Commit messages: - Linux fixes - Don't use std::thread in j.l.f tests Changes: https://git.openjdk.org/jdk/pull/9599/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9599&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8290059 Stats: 171 lines in 7 files changed: 123 ins; 7 del; 41 mod Patch: https://git.openjdk.org/jdk/pull/9599.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9599/head:pull/9599 PR: https://git.openjdk.org/jdk/pull/9599