Re: Bring atomic flag fallback up to snuff

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: Bring atomic flag fallback up to snuff
Дата
Msg-id
20180407183016.ig7u2u577tyl32h5@alap3.anarazel.de
Ответ на
Список
Дерево обсуждения
Bring atomic flag fallback up to snuff Andres Freund <andres@anarazel.de>
Re: Bring atomic flag fallback up to snuff Tom Lane <tgl@sss.pgh.pa.us>
Re: Bring atomic flag fallback up to snuff Andres Freund <andres@anarazel.de>
Re: Bring atomic flag fallback up to snuff Tom Lane <tgl@sss.pgh.pa.us>
Re: Bring atomic flag fallback up to snuff Andres Freund <andres@anarazel.de>
Re: Bring atomic flag fallback up to snuff Andres Freund <andres@anarazel.de>
Re: Bring atomic flag fallback up to snuff Magnus Hagander <magnus@hagander.net>
Re: Bring atomic flag fallback up to snuff Andres Freund <andres@anarazel.de>
Hi,

On 2018-04-07 14:23:38 -0400, Tom Lane wrote:
> I think I'd just drop those asserts altogether.  The hardware is in charge
> of complaining about misaligned pointers.

Well, the problem is that some atomics operations on some platforms do
not fail for unaligned pointers, they just loose their atomic
property. Fun times.


> If you do insist on asserting something, it needs to be about ptr->sema;
> the bool value field isn't going to have any interesting alignment
> requirement, but the sema might.

The alignment requirements of sema is going to be taken care of by
normal alignment rules, otherwise we'd be in trouble all over the tree
already.

Think I'll just drop it from the general branch, and add it to the
generic gcc implementation that uses a four byte value (because of arm
and the like).

Greetings,

Andres Freund

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Andreas Seltenreich
Дата:
FAQ