Обсуждение: Removing shm_mq.c's volatile qualifiers

Поиск
Список
Период
Сортировка

Removing shm_mq.c's volatile qualifiers

От
Thomas Munro
Дата:
Hi,

As far as I can see, all the volatile qualifiers in shm_mq.c have been
redundant since ec9037df263.  Here's a patch to remove them (like
several similar patches -- see commit message).  Does this make sense?
 Is there something special about that pointer to volatile pointer to
PGPROC?  If so I don't see it.

-- 
Thomas Munro
http://www.enterprisedb.com

Вложения

Re: Removing shm_mq.c's volatile qualifiers

От
Robert Haas
Дата:
On Sun, Feb 11, 2018 at 6:52 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> As far as I can see, all the volatile qualifiers in shm_mq.c have been
> redundant since ec9037df263.

That's the commit that added shm_mq.c.  ITYM 0709b7ee as you said in
the commit message....

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


Re: Removing shm_mq.c's volatile qualifiers

От
Thomas Munro
Дата:
On Tue, Feb 13, 2018 at 9:09 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Sun, Feb 11, 2018 at 6:52 PM, Thomas Munro
> <thomas.munro@enterprisedb.com> wrote:
>> As far as I can see, all the volatile qualifiers in shm_mq.c have been
>> redundant since ec9037df263.
>
> That's the commit that added shm_mq.c.  ITYM 0709b7ee as you said in
> the commit message....

Right, sorry.  They were needed when they were added in ec9037df263
(Jan 2014) but they became redundant in 0709b7ee (Sep 2014).

-- 
Thomas Munro
http://www.enterprisedb.com


Re: Removing shm_mq.c's volatile qualifiers

От
Andres Freund
Дата:
Hi,

On 2018-02-12 12:52:32 +1300, Thomas Munro wrote:
> From e584628bb846be11a137b5216e955284dfd646a5 Mon Sep 17 00:00:00 2001
> From: Thomas Munro <thomas.munro@enterprisedb.com>
> Date: Thu, 8 Feb 2018 18:50:32 +1300
> Subject: [PATCH] Remove volatile qualifiers from shm_mq.c.
> 
> Since commit 0709b7ee, spinlock primitives include a compiler barrier so
> it is no longer necessary to access either spinlocks or the memory they
> protect through pointer-to-volatile.  Like earlier commits e93b6298, d53e3d5f,
> 430008b5, 8f6bb851, df4077cd.

Pushed.


Thanks,

Andres