Re: unconstify equivalent for volatile

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unconstify equivalent for volatile
Date: 2019-02-25 08:29:36
Message-ID: 7c6faae0-8784-7575-a33a-36d60115ab3c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-02-22 21:31, Andres Freund wrote:
> On 2019-02-22 12:38:35 +0100, Peter Eisentraut wrote:
>> On 2019-02-19 18:02, Andres Freund wrote:
>>> But even if we were to decide we'd want to keep a volatile in SetLatch()
>>> - which I think really would only serve to hide bugs - that'd not mean
>>> it's a good idea to keep it on all the other functions in latch.c.

> Right. But we should ever look/write into the contents of a latch
> outside of latch.c, so I don't think that'd really be a problem, even if
> we relied on volatiles.

So how about this patch?

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Remove-volatile-from-latch-API.patch text/plain 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-02-25 08:33:34 Re: some ri_triggers.c cleanup
Previous Message Tsunakawa, Takayuki 2019-02-25 08:22:49 RE: Protect syscache from bloating with negative cache entries