Re: [PATCH] Add c++2a binary_semaphore

2020-02-26 Thread Jonathan Wakely
On 24/02/20 21:53 -0500, Thomas Rodgers wrote: +bool +_S_futex_wait_until(int* __addr, int __val, + bool __has_timeout = false, + std::chrono::seconds __s = std::chrono::seconds::zero(), + std::chrono::nanoseconds __ns =

Re: [PATCH] Add c++2a binary_semaphore

2020-02-25 Thread Jonathan Wakely
On 25/02/20 12:33 +, Jonathan Wakely wrote: On 25/02/20 09:52 +0100, Sebastian Huber wrote: Hello Thomas, some operating systems provide already an implementation of binary semaphores with a compatible API, e.g. RTEMS. It would be nice if I could use it in libstdc++. I guess you don't

Re: [PATCH] Add c++2a binary_semaphore

2020-02-25 Thread Jonathan Wakely
On 25/02/20 09:52 +0100, Sebastian Huber wrote: Hello Thomas, some operating systems provide already an implementation of binary semaphores with a compatible API, e.g. RTEMS. It would be nice if I could use it in libstdc++. I guess you don't want to have #ifdef __rtems__ stuff in this code.

Re: [PATCH] Add c++2a binary_semaphore

2020-02-25 Thread Sebastian Huber
Hello Thomas, some operating systems provide already an implementation of binary semaphores with a compatible API, e.g. RTEMS. It would be nice if I could use it in libstdc++. I guess you don't want to have #ifdef __rtems__ stuff in this code. What about defining a binary semaphore API for

Re: [PATCH] Add c++2a binary_semaphore

2020-02-24 Thread Thomas Rodgers
Hopefully less borked than the previous one, adds futex support. - Original Message - From: "Thomas Rodgers" To: gcc-patches@gcc.gnu.org, libstd...@gcc.gnu.org Sent: Wednesday, February 19, 2020 7:18:36 PM Subject: Re: [PATCH] Add c++2a binary_semaphore Should address th

Re: [PATCH] Add c++2a binary_semaphore

2020-02-21 Thread Sebastian Huber
On 18/02/2020 15:30, Jonathan Wakely wrote: On 18/02/20 14:48 +0100, Sebastian Huber wrote: Hello, On 18/02/2020 07:46, Thomas Rodgers wrote: This patch adds the c++2a semaphore header and binary_semaphore type. The implementation is not complete, this patch is just to solicit initial

Re: [PATCH] Add c++2a binary_semaphore

2020-02-18 Thread Jonathan Wakely
On 18/02/20 14:48 +0100, Sebastian Huber wrote: Hello, On 18/02/2020 07:46, Thomas Rodgers wrote: This patch adds the c++2a semaphore header and binary_semaphore type. The implementation is not complete, this patch is just to solicit initial feedback. how do you plan to implement the binary

Re: [PATCH] Add c++2a binary_semaphore

2020-02-18 Thread Jonathan Wakely
On 18/02/20 01:46 -0500, Thomas Rodgers wrote: This patch adds the c++2a semaphore header and binary_semaphore type. The implementation is not complete, this patch is just to solicit initial feedback. Here is some initial feedback on comments and whitespace :-) diff --git

Re: [PATCH] Add c++2a binary_semaphore

2020-02-18 Thread Sebastian Huber
Hello, On 18/02/2020 07:46, Thomas Rodgers wrote: This patch adds the c++2a semaphore header and binary_semaphore type. The implementation is not complete, this patch is just to solicit initial feedback. how do you plan to implement the binary semaphores? For example, do you want to add the

[PATCH] Add c++2a binary_semaphore

2020-02-17 Thread Thomas Rodgers
:57 -0800 Subject: [PATCH] Add c++2a binary_semaphore * include/std/semaphore: New file. * include/std/version (__cpp_lib_semaphore): Add feature test macro. * include/Makefile.am (std_headers): add semaphore. * include/Makefile.in: Regenerate. * testsuite/30_threads/semaphore/1