Re: Atomic operations within spinlocks

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Atomic operations within spinlocks
Date: 2020-06-11 19:50:28
Message-ID: CA+Tgmob_iAh7ert+c6Btc1x0p0peHy10wdZ83KtWO-4csbkEZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 11, 2020 at 1:26 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
> Well, pss_barrierCheckMask member is just 32bit, so it seems odd to
> declare the local variable 64bit?
>
> uint64 flagbit = UINT64CONST(1) << (uint64) type;
> ...
> pg_atomic_fetch_or_u32(&slot->pss_barrierCheckMask, flagbit);

Oooooops.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-06-11 20:19:21 Re: [PATCH] fix two shadow vars (src/backend/commands/sequence.c)
Previous Message Mark Dilger 2020-06-11 19:10:06 Re: new heapcheck contrib module