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

2007-09-23 Thread Florian G. Pflug
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

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

2007-09-23 Thread Tom Lane
Florian G. Pflug [EMAIL PROTECTED] 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...

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

2007-09-23 Thread Jonah H. Harris
On 9/23/07, Tom Lane [EMAIL PROTECTED] wrote: 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. I agree. I'd prefer to know exactly what's going on in the atomic code (rather than having the compiler take

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

2007-09-23 Thread Derek E. Lewis
On Mon, 24 Sep 2007, Jonah H. Harris wrote: I agree. I'd prefer to know exactly what's going on in the atomic code (rather than having the compiler take care of it for me). Similarly, it's pretty rare to use GCC on anything but Linux and the *BSDs as each proprietary UNIX vendor has their own