Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Dec 2005 18:08:05 +0000 (18:08 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 29 Dec 2005 18:08:05 +0000 (18:08 +0000)
commit195f1642285d59b4bd42ec2ba8bbcf46b8aedd93
tree22da2794ecf95bafe907556acaa83ea45ef1042b
parente135d9631bcf789ce3aa3a351e2d8af7fc743896
Get rid of the SpinLockAcquire/SpinLockAcquire_NoHoldoff distinction
in favor of having just one set of macros that don't do HOLD/RESUME_INTERRUPTS
(hence, these correspond to the old SpinLockAcquire_NoHoldoff case).
Given our coding rules for spinlock use, there is no reason to allow
CHECK_FOR_INTERRUPTS to be done while holding a spinlock, and also there
is no situation where ImmediateInterruptOK will be true while holding a
spinlock.  Therefore doing HOLD/RESUME_INTERRUPTS while taking/releasing a
spinlock is just a waste of cycles.  Qingqing Zhou and Tom Lane.
src/backend/access/transam/xlog.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/ipc/shmem.c
src/backend/storage/lmgr/lwlock.c
src/include/storage/buf_internals.h
src/include/storage/spin.h