Re: RFR: 8290059: Do not use std::thread in panama tests [v5]

2022-07-28 Thread Thomas Stuefe
On Wed, 27 Jul 2022 14:34:49 GMT, Jorn Vernee 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 (s

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-28 Thread Jorn Vernee
On Fri, 22 Jul 2022 18:44:30 GMT, Thomas Stuefe wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > Hi @JornVernee, > > good job and thanks for doing it so quickly. Looks good, module the > GetLastError comm

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-27 Thread David Holmes
On Wed, 27 Jul 2022 14:29:26 GMT, Jorn Vernee wrote: > startThread and joinThread is not the functionality that the tests need. But it is the functionality the tests are already using. > now the context passed to CreateThread and pthread_create has to outlive the > function That's not an issu

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-27 Thread Jorn Vernee
On Wed, 27 Jul 2022 06:43:45 GMT, David Holmes wrote: > > Does run_in_new_thread seem good enough? > > No, sorry, the fact it both runs and joins is a critical aspect. `run_async` > in `CompleteableFuture` just does the "run in new thread" part, whereas the > `get()` on the returned `FutureTas

Re: RFR: 8290059: Do not use std::thread in panama tests [v5]

2022-07-27 Thread Jorn Vernee
> 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 head

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread David Holmes
On Tue, 26 Jul 2022 13:10:00 GMT, Jorn Vernee wrote: > Does run_in_new_thread seem good enough? No, sorry, the fact it both runs and joins is a critical aspect. `run_async` in `CompleteableFuture` just does the "run in new thread" part, whereas the `get()` on the returned `FutureTask` provide

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Fri, 22 Jul 2022 16:45:55 GMT, Jorn Vernee 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 (s

Re: RFR: 8290059: Do not use std::thread in panama tests [v4]

2022-07-26 Thread Jorn Vernee
> 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 head

Re: RFR: 8290059: Do not use std::thread in panama tests [v3]

2022-07-26 Thread Jorn Vernee
> 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 head

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Tue, 26 Jul 2022 13:39:50 GMT, Jorn Vernee wrote: >> The intent was to exit the test with a non-zero exit code, in order to avoid >> any accidental false positives. >> >> I could return the error code from `GetLastError` and from the respective >> pthread apis as an exit code instead. Is th

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Tue, 26 Jul 2022 12:58:09 GMT, Jorn Vernee wrote: >> test/lib/native/testlib_threads.h line 50: >> >>> 48: static void fatal(const char* message) { >>> 49: perror(message); >>> 50: exit(-1); >> >> Won't work as intended for Windows APIs. I would print the result of >> `GetLastError(

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Sat, 23 Jul 2022 05:58:42 GMT, David Holmes wrote: > `run_async` is an odd name for this, especially as the fact you create then > join mean it doesn't run asynchronously at all - it runs synchronously in > another thread. I took the name from the CompleteableFuture API [1], although in th

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Fri, 22 Jul 2022 18:37:02 GMT, Thomas Stuefe wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > test/lib/native/testlib_threads.h line 61: > >> 59: helper->proc(helper->context); >> 60: return 0;

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-26 Thread Jorn Vernee
On Fri, 22 Jul 2022 18:32:56 GMT, Thomas Stuefe wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > test/lib/native/testlib_threads.h line 50: > >> 48: static void fatal(const char* message) { >> 49: perr

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-25 Thread Erik Joelsson
On Fri, 22 Jul 2022 16:45:55 GMT, Jorn Vernee 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 (s

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread David Holmes
On Fri, 22 Jul 2022 16:45:55 GMT, Jorn Vernee 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 (s

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Thomas Stuefe
On Fri, 22 Jul 2022 16:45:55 GMT, Jorn Vernee 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 (s

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Maurizio Cimadamore
On Fri, 22 Jul 2022 16:41:24 GMT, Jorn Vernee 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 (s

Re: RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Christoph Langer
On Fri, 22 Jul 2022 15:09:13 GMT, Christoph Langer 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 futu

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Jorn Vernee
On Fri, 22 Jul 2022 14:56:16 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixes > > Looks good! @mcimadamore Thanks for the comments. I've cleaned up the comments on the compiler switc

Re: RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Jorn Vernee
On Fri, 22 Jul 2022 15:09:13 GMT, Christoph Langer 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 futu

Re: RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Christoph Langer
On Thu, 21 Jul 2022 18:48:14 GMT, Jorn Vernee 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 > t

Re: RFR: 8290059: Do not use std::thread in panama tests [v2]

2022-07-22 Thread Jorn Vernee
> 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 head

Re: RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Maurizio Cimadamore
On Thu, 21 Jul 2022 18:48:14 GMT, Jorn Vernee 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 > t

RFR: 8290059: Do not use std::thread in panama tests

2022-07-22 Thread Jorn Vernee
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 libr