[PATCH] Add support for C++20 barriers

2020-09-07 Thread Thomas Rodgers
Re-sending Adds * include/Makefile.am (std_headers): Add new header. * include/Makefile.in: Regenerate. * include/bits/atomic_base.h (__atomic_base<_Itp>::_M_wait): Define. (__atomic_base<_Itp>::wait): Delegate to _M_wait. * include/std/barrier: New file.

[PATCH] Add support for C++20 barriers

2020-06-06 Thread Thomas Rodgers
* include/Makefile.am (std_headers): Add new header. * include/Makefile.in: Regenerate. * include/std/barrier: New file. * testsuite/30_thread/barrier/1.cc: New test. * testsuite/30_thread/barrier/2.cc: Likewise. * testsuite/30_thread/barrier/arrive_a

Re: [PATCH] Add support for C++20 barriers

2020-05-24 Thread Thomas Rodgers
> On May 24, 2020, at 11:11 AM, Jonathan Wakely wrote: > > On Sun, 24 May 2020 at 18:55, Florian Weimer wrote: >> >> * Thomas Rodgers: >> >>> + static __gthread_t >>> + _S_get_tid() noexcept >>> + { >>> +#ifdef __GLIBC__ >>> + // For the GNU C library pthread_self() is usa

Re: [PATCH] Add support for C++20 barriers

2020-05-24 Thread Florian Weimer
* Jonathan Wakely: > On Sun, 24 May 2020 at 18:55, Florian Weimer wrote: >> >> * Thomas Rodgers: >> >> > + static __gthread_t >> > + _S_get_tid() noexcept >> > + { >> > +#ifdef __GLIBC__ >> > + // For the GNU C library pthread_self() is usable without linking to >> > + // li

Re: [PATCH] Add support for C++20 barriers

2020-05-24 Thread Jonathan Wakely via Gcc-patches
On Sun, 24 May 2020 at 18:55, Florian Weimer wrote: > > * Thomas Rodgers: > > > + static __gthread_t > > + _S_get_tid() noexcept > > + { > > +#ifdef __GLIBC__ > > + // For the GNU C library pthread_self() is usable without linking to > > + // libpthread.so but returns 0, so w

Re: [PATCH] Add support for C++20 barriers

2020-05-24 Thread Florian Weimer
* Thomas Rodgers: > + static __gthread_t > + _S_get_tid() noexcept > + { > +#ifdef __GLIBC__ > + // For the GNU C library pthread_self() is usable without linking to > + // libpthread.so but returns 0, so we cannot use it in single-threaded > + // programs, because this_

Re: [PATCH] Add support for C++20 barriers

2020-05-24 Thread Thomas Rodgers
This time with 100% more patch… 0001-Add-support-for-C-20-barriers_f.patch Description: Binary data > On May 23, 2020, at 3:58 PM, Thomas Rodgers wrote: > > This patch requires the patch for atomic::wait/notify to be applied first. > > This implementation is based on the libc++ implementati

[PATCH] Add support for C++20 barriers

2020-05-23 Thread Thomas Rodgers
This patch requires the patch for atomic::wait/notify to be applied first. This implementation is based on the libc++ implementation, but excludes the alternative “central barrier” implementation for now as there is no standard way to switch between the two. * include/Makefile.am (std_h