diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-04-16 19:53:38 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-04-16 19:53:38 -0400 |
commit | 4039c736eb0955cb1daf88e211f105dbbb78f7ea (patch) | |
tree | f7b97a487f996c824fbce1f68d2fd368453d9bda /src/backend/access/gist/gistxlog.c | |
parent | 5fdda1ceab35311367ed0dbb283cd8aea896e49b (diff) | |
download | postgresql-4039c736eb0955cb1daf88e211f105dbbb78f7ea.tar.gz postgresql-4039c736eb0955cb1daf88e211f105dbbb78f7ea.zip |
Adjust spin.c's spinlock emulation so that 0 is not a valid spinlock value.
We've had repeated troubles over the years with failures to initialize
spinlocks correctly; see 6b93fcd14 for a recent example. Most of the time,
on most platforms, such oversights can escape notice because all-zeroes is
the expected initial content of an slock_t variable. The only platform
we have where the initialized state of an slock_t isn't zeroes is HPPA,
and that's practically gone in the wild. To make it easier to catch such
errors without needing one of those, adjust the --disable-spinlocks code
so that zero is not a valid value for an slock_t for it.
In passing, remove a bunch of unnecessary #include's from spin.c;
commit daa7527afc227443 removed all the intermodule coupling that
made them necessary.
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
0 files changed, 0 insertions, 0 deletions