GCC builtins for atomic-test-and-set, memory barries, and such - Mailing list pgsql-hackers

From Florian G. Pflug
Subject GCC builtins for atomic-test-and-set, memory barries, and such
Date
Msg-id 46F70E3F.6020409@phlo.org
Whole thread Raw
Responses Re: GCC builtins for atomic-test-and-set, memory barries, and such
List pgsql-hackers
Hi

When reading Tom's comment about the bug in my "use latestCompletedXid 
to slightly speed up TransactionIdIsInProgress" patch, I remembered that 
I recently stumbled across GCC builtins for atomic test-and-test and
read/write reordering barriers...

Has anyone looked into those? It seems that those could be used to 
provide a fallback spinlock implementation - though maybe we already 
cover all interesting targets, and it's not worth the effort.

Anyway, here is the link to the GCC docu. It says that the naming of 
these follows some Intel Spec, so presumably the Intel compiler supports 
the same builtins...
http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html

greetings, Florian Pflug


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [PATCHES] msvc, build and install with cygwin in the PATH
Next
From: "Chuck McDevitt"
Date:
Subject: Problem with MSVC install script