diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-08-29 10:05:48 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-08-29 10:05:48 -0400 |
commit | c01c25fbe525869fa81237954727e1eb4b7d4a14 (patch) | |
tree | 6a8a0f4155cc95d25d6aaacdb6e47c6170975127 /src/backend/access/gist/gistget.c | |
parent | 6e1f1fee97839599cf59f37f7051786a09f3b240 (diff) | |
download | postgresql-c01c25fbe525869fa81237954727e1eb4b7d4a14.tar.gz postgresql-c01c25fbe525869fa81237954727e1eb4b7d4a14.zip |
Improve spinlock performance for HP-UX, ia64, non-gcc.
At least on this architecture, it's very important to spin on a
non-atomic instruction and only retry the atomic once it appears
that it will succeed. To fix this, split TAS() into two macros:
TAS(), for trying to grab the lock the first time, and TAS_SPIN(),
for spinning until we get it. TAS_SPIN() defaults to same as TAS(),
but we can override it when we know there's a better way.
It's likely that some of the other cases in s_lock.h require
similar treatment, but this is the only one we've got conclusive
evidence for at present.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
0 files changed, 0 insertions, 0 deletions