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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GCC builtins for atomic-test-and-set, memory barries, and such
Date: 2007-09-24 03:42:13
Message-ID: 27899.1190605333@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
> 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.

It doesn't seem very interesting given that (a) we already have working
code for this area, and (b) gcc is not our only target compiler.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2007-09-24 03:52:55 pgsql: Reduce the size of memory allocations by lazy vacuum when
Previous Message Andrew Dunstan 2007-09-24 02:44:51 Re: Problem with MSVC install script