On Tuesday, 23 March 2021 08:39:43 PDT Thomas Rodgers wrote:
> I will be submitting a new patch for the
> atomic.wait/barrier/latch/semaphore functionality a bit later today that
> subsumes the changes to atomic_wait and latch, and includes the changes
> to barrier.
Thanks, Thomas
Is that meant t
> Discussion at:
> https://gcc.gnu.org/pipermail/libstdc++/2021-February/052043.html
>
> This patch set includes the uncontroversial parts that improve
> performance but don't otherwise change ABI.
>
> Please note we still need to decide on how to deal with the future ABI
> break.
>
> Thiago Mac
ints can be used as futex on Linux. ptrdiff_t on 64-bit Linux can't.
libstdc++-v3/ChangeLog:
* include/std/latch: Use int instead of ptrdiff_t
---
libstdc++-v3/include/std/latch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/std/latch b/libst
Our thread's ID does not change so we don't have to get it every time
and hash it every time.
libstdc++-v3/ChangeLog:
* include/std/barrier(arrive): move hasher one level up in the
stack.
---
libstdc++-v3/include/std/barrier | 10 +-
1 file changed, 5 insertions(+), 5 d
Discussion at:
https://gcc.gnu.org/pipermail/libstdc++/2021-February/052043.html
This patch set includes the uncontroversial parts that improve
performance but don't otherwise change ABI.
Please note we still need to decide on how to deal with the future ABI
break.
Thiago Macieira (3):
Atomic
The kernel doesn't care what we store in those 32 bits, only that they are
comparable. This commit adds:
* pointers and long on 32-bit architectures
* unsigned
* untyped enums and typed enums on int & unsigned int
* float
We're not using FUTEX_OP anywhere today. The kernel reserves 4 bits for
On Wednesday, 3 March 2021 08:21:51 PST Jonathan Wakely wrote:
> >>- = is_same_v, __platform_wait_t>;
> >>+ = is_scalar_v> && sizeof(_Tp) ==
> >>sizeof(__platform_wait_t)
> Oh, except that is_scalar is surprisingly expensive to instantiate
> (its defined in a really expensive way) and s
On Wednesday, 3 March 2021 06:34:26 PST Jonathan Wakely wrote:
> On 26/02/21 07:59 -0800, Thiago Macieira via Libstdc++ wrote:
> >ints can be used as futex on Linux. ptrdiff_t on 64-bit Linux can't.
>
> Yes, we should do this for GCC 11.
Want me to re-submit this one alone, with the "alignas(4)"
On Monday, 1 March 2021 14:31:09 PST Ville Voutilainen wrote:
> On Tue, 2 Mar 2021 at 00:21, Thiago Macieira
wrote:
> > But the code I posted, if people are careful to use write like I did,
> > would
> > allow us to have the experimental "we're not sure this is right"
> > implementation of atomic
On Monday, 1 March 2021 14:04:34 PST Ville Voutilainen wrote:
> Well, this would be different. What I'm suggesting is not quite that;
> for any *new* facility, we'd make sure
> that its draft macro and the final IS macro are different, but the
> minimum value is the first draft version,
> not anyth
On Monday, 1 March 2021 12:35:05 PST Ville Voutilainen wrote:
> I can't make the above code work, in any reasonable manner, because
> it's doing feature detection incorrectly. :)
> What I can imagine doing, however, is this:
>
> 1) a published IS always bumps feature-macro values (this won't help
On Monday, 1 March 2021 10:12:35 PST Ville Voutilainen wrote:
> I do have a question about the intent/concern here, regardless of what
> your patch technically
> does. The ABI break _is_ your concern, and the "heisenbugs" you were
> worried about would
> in fact be caused by the ABI break? So if yo
On Monday, 1 March 2021 09:38:58 PST Thomas Rodgers wrote:
> > And _M_phase, despite being non-atomic, is never accessed without the
> > atomic_ref, aside from the constructor. Both arrive() and wait() start
> > off by
> > creating the atomic_ref.
>
> If it's non-atomic, then how is wait() suppose
On Sunday, 28 February 2021 07:05:47 PST Hans-Peter Nilsson wrote:
> On Fri, 26 Feb 2021, Thiago Macieira via Gcc-patches wrote:
> > ints can be used in futexes. chars can't.
>
> Shouldn't that be an atomic type instead of a bare int then?
There are a couple of
On Friday, 26 February 2021 11:31:00 PST Andreas Schwab wrote:
> On Feb 26 2021, Thiago Macieira wrote:
> > On Friday, 26 February 2021 10:14:42 PST Andreas Schwab wrote:
> >> On Feb 26 2021, Thiago Macieira via Gcc-patches wrote:
> >> > -alignas(__aligno
On Friday, 26 February 2021 10:14:42 PST Andreas Schwab wrote:
> On Feb 26 2021, Thiago Macieira via Gcc-patches wrote:
> > @@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> > }
> >
> > private:
> > -alignas(__alignof__(ptrdiff_t)) ptrdiff_t _M_a;
>
Our thread's ID does not change so we don't have to get it every time
and hash it every time.
---
libstdc++-v3/include/std/barrier | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libstdc++-v3/include/std/barrier b/libstdc++-v3/include/std/barrier
index ae058bd3dc3..e
ints can be used in futexes. chars can't.
---
libstdc++-v3/include/std/barrier | 21 -
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/libstdc++-v3/include/std/barrier b/libstdc++-v3/include/std/barrier
index e09212dfcb9..ae058bd3dc3 100644
--- a/libstdc++-v3/inc
That violates "don't pay for what you don't need" rule of C++. Users of
std::atomic::wait will often have some bit in their atomic indicate
whether the value is contended or not, so we don't need libstdc++ to do
double book-keeping for us.
---
libstdc++-v3/include/bits/atomic_wait.h | 22 +
The kernel doesn't care what we store in those 32 bits, only that they are
comparable. This commit adds:
* pointers and long on 32-bit architectures
* unsigned
* untyped enums and typed enums on int & unsigned int
* float
We're not using FUTEX_OP anywhere today. The kernel reserves 4 bits for
ints can be used as futex on Linux. ptrdiff_t on 64-bit Linux can't.
---
libstdc++-v3/include/std/latch | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/std/latch b/libstdc++-v3/include/std/latch
index ef8c301e5e9..156aea5c5e5 100644
--- a/libstdc++-v3/i
21 matches
Mail list logo