Atomic Operations

Поиск
Список
Период
Сортировка
От Markus Schiltknecht
Тема Atomic Operations
Дата
Msg-id 45A532AB.6020505@bluegap.ch
обсуждение исходный текст
Ответы Re: Atomic Operations  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Atomic Operations  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

what are the assumptions PostgreSQL normally does about atomic 
operations? I see sig_atomic_t is used in signal handlers. Additionally, 
there is a match for a cmpxchg instruction in some solaris ports code, 
but that's about what I found in the source.

Am I safe assuming that pointer assignments are atomic (on all platforms 
PostgreSQL compiles on, that is)? (This is a 'practical advice' from the 
GNU Libc Manual) How about other integers smaller or equal in size to 
sizeof(sig_atomic_t)?

I'm asking to make sure I rely on the same guarantees in my code.

Regards

Markus


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11
Следующее
От: Stefan Kaltenbrunner
Дата:
Сообщение: Re: [PATCHES] fix build on Solaris 10/x86_64 in 64bit mode with Sun