Re: pgsql: Add pg_atomic_unlocked_write_u64

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Add pg_atomic_unlocked_write_u64
Дата
Msg-id 1139398.1764872155@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Add pg_atomic_unlocked_write_u64  (Andres Freund <andres@anarazel.de>)
Ответы Re: pgsql: Add pg_atomic_unlocked_write_u64
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> How about:

> /*
>  * pg_atomic_unlocked_write_u32 - unlocked write to atomic variable.
>  *
>  * Write to an atomic variable, without atomicity guarantees. I.e. it is not
>  * guaranteed that a concurent reader will not see a torn value, nor to

grammar police: s/nor to/nor is this/

>  * guaranteed to correctly interact with concurrent read-modify-write
>  * operations like pg_atomic_compare_exchange_u32.  This should only be used
>  * in cases where minor performance regressions due to atomic operations are
>  * unacceptable and where exclusive access is guaranteed due to some external
>  * means.
>  *
>  * No barrier semantics.
>  */

LGTM otherwise.

            regards, tom lane



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