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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?
Дата
Msg-id CAB7nPqQUcqomB_Lw9TSQj3RMKeuCjrJykKejKmi4g9-PcKVR6g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?
Список pgsql-hackers
On Fri, Oct 16, 2015 at 9:07 AM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Wed, Oct 7, 2015 at 8:52 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Thu, Oct 1, 2015 at 11:01 PM, Michael Paquier
>> <michael.paquier@gmail.com> wrote:
>>>> Right, see attached.
>>>
>>> It seems to me that we could as well simplify checkpoint.c and
>>> logical.c. In those files volatile casts are used as well to protect
>>> from reordering for spinlock operations. See for example 0002 on top
>>> of 0001 that is Thomas' patch.
>>
>> These patches look good to me, so I have committed them.
>
> Thanks.  Also, spin.h's comment contains an out of date warning about
> this.  Here's a suggested fix for that, and a couple more volatrivia
> patches.

I have looked at the rest of the code, and it seems that we can get
rid of volatile in a couple of extra places like in the attached as
those are used with spin locks. This applies on top of Thomas' set.
--
Michael

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Patch: Optimize memory allocation in function 'bringetbitmap'
Следующее
От: Bruce Momjian
Дата:
Сообщение: TODO list updates