GCC builtins for atomic-test-and-set, memory barries, and such

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: GCC builtins for atomic-test-and-set, memory barries, and such
Date: 2007-09-24 01:09:19
Message-ID: 46F70E3F.6020409@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chuck McDevitt 2007-09-24 01:50:53 Problem with MSVC install script
Previous Message Andrew Dunstan 2007-09-23 20:33:28 Re: [PATCHES] msvc, build and install with cygwin in the PATH