Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group