Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_with inlin - Mailing list pgsql-committers

From Noah Misch
Subject Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_with inlin
Date
Msg-id 20190914171154.GA3487808@rfd.leadboat.com
Whole thread Raw
In response to Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_ with inlin  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_ with inlin  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Sat, Sep 14, 2019 at 10:10:47AM -0400, Tom Lane wrote:
> Noah Misch <noah@leadboat.com> writes:
> > For all ppc compilers, implement pg_atomic_fetch_add_ with inline asm.
> 
> prairiedog thinks there's something wrong here --- probably, some global
> enabling #define is missing?

I can reproduce its situation by commenting out the HAVE_GCC_ symbols in
pg_config.h.  This commit did "#define PG_HAVE_ATOMIC_U32_SUPPORT" but defined
only fetch_add, not compare_exchange.  That works with generic-gcc.h, but
fallback.h can't replace just one.  (Rightly so -- fallback.h defines the
pg_atomic_uint32 structure differently.)  I can see these ways to fix this:

1. Add pg_atomic_compare_exchange_u{32,64}_impl to arch-ppc.h
2. Arrange for arch-ppc.h to be a no-op when GCC atomics are unavailable
3. Just revert

(1) seems best.  Since it may be days or weeks before I get to that, I'm
inclined to revert after ~24h of total buildfarm exposure.



pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_ with inlin
Next
From: Tom Lane
Date:
Subject: Re: pgsql: For all ppc compilers, implement pg_atomic_fetch_add_ with inlin