On Tue, Aug 4, 2015 at 11:50 AM, Amit Kapila <amit.kapil...@gmail.com> wrote: > I have kept barriers based on comments on top of atomic read, refer > below code: > > * No barrier semantics. > */ > STATIC_IF_INLINE uint32 > pg_atomic_read_u32(volatile pg_atomic_uint32 *ptr) > > Note - The function header comments on pg_atomic_read_u32 and > corresponding write call seems to be reversed, but that is something > separate.
That doesn't matter, because the compare-and-exchange *is* a barrier. Putting a barrier between a store and an operation that is already a barrier doesn't do anything useful. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers