Re: __attribute__ for non-gcc compilers

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: __attribute__ for non-gcc compilers
Дата
Msg-id CA+TgmobLfdkH+EX6pZNcHCWEaEEuZ+JYYKBjSP0Vc3o_kfELNg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: __attribute__ for non-gcc compilers  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: __attribute__ for non-gcc compilers  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On Wed, Jan 14, 2015 at 5:29 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> I think it's better than the alternatives:
>
> a) Don't support 64bit atomics on any 32bit platform. I think that'd be
>    sad because there's some places that could greatly benefit from being
>    able to read/store/manipulate e.g. LSNs atomically.
> b) Double the size of 64bit atomics on 32bit platforms, and add
>    TYPEALIGN() to every access inside the atomics implementation.
> c) Require 64 atomics to be aligned appropriately manually in every
>    place they're embedded. I think that's completely impractical.
>
> The only viable one imo is a)

I can't really fault that reasoning, but if __attribute__((align))
only works on some platforms, then you've got silent, subtle breakage
on the ones where it doesn't.

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



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: __attribute__ for non-gcc compilers
Следующее
От: Andres Freund
Дата:
Сообщение: Re: __attribute__ for non-gcc compilers