]> granicus.if.org Git - postgresql/commit
Ensure that all direct uses of spinlock-protected data structures use
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 Dec 2001 18:16:43 +0000 (18:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 Dec 2001 18:16:43 +0000 (18:16 +0000)
commitd3fc362ec2ce1cf095950dddf24061915f836c22
treebdfb59f8d948a808596f10fee40b8ba21cf0e469
parent774490c3db9a10df0d00f6d0ee72cb99a5298259
Ensure that all direct uses of spinlock-protected data structures use
'volatile' pointers to access those structures, so that optimizing
compilers will not decide to move the structure accesses outside of the
spinlock-acquire-to-spinlock-release sequence.  There are no known bugs
in these uses at present, but based on bad experience with lwlock.c,
it seems prudent to ensure that we protect these other uses too.
Per pghackers discussion around 12-Dec.  (Note: it should not be
necessary to worry about structures protected by LWLocks, since the
LWLock acquire and release operations are not inline macros.)
src/backend/access/transam/xlog.c
src/backend/storage/ipc/shmem.c
src/backend/storage/lmgr/proc.c