Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?
Дата
Msg-id CAEepm=2ajhe3uN7BoxX-fons0y3gw+BJWOS=ue7J0Gocu-=OQQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Tue, Sep 22, 2015 at 8:19 AM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Thomas Munro wrote:
>
>> In walsender.c, walreceiver.c, walreceiverfuncs.c there are several
>> places where volatile qualifiers are used apparently only to prevent
>> reordering around spinlock operations.
>
> In replication/slot.c there are a number of places (12, I think) that
> introduce a block specifically to contain a volatile cast on a variable
> for spinlock-protected access.  We could remove the whole thing and save
> at least 3 lines and one indentation level for each of them.

Right, see attached.

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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: jsonb_set array append hack?
Следующее
От: Noah Misch
Дата:
Сообщение: Re: row_security GUC, BYPASSRLS