Commit 584f818b authored by Tom Lane's avatar Tom Lane

Declare LWLock pointers as volatile to prevent AIX compiler from

reordering operations at its whim.  Releasing TAS lock before we've
finished updating proc structure is uncool.
parent 53016fa5
......@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.3 2001/11/05 17:46:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lwlock.c,v 1.4 2001/12/10 21:13:50 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -185,7 +185,7 @@ LWLockAssign(void)
void
LWLockAcquire(LWLockId lockid, LWLockMode mode)
{
LWLock *lock = LWLockArray + lockid;
volatile LWLock *lock = LWLockArray + lockid;
bool mustwait;
PRINT_LWDEBUG("LWLockAcquire", lockid, lock);
......@@ -303,7 +303,7 @@ LWLockAcquire(LWLockId lockid, LWLockMode mode)
bool
LWLockConditionalAcquire(LWLockId lockid, LWLockMode mode)
{
LWLock *lock = LWLockArray + lockid;
volatile LWLock *lock = LWLockArray + lockid;
bool mustwait;
PRINT_LWDEBUG("LWLockConditionalAcquire", lockid, lock);
......@@ -369,7 +369,7 @@ LWLockConditionalAcquire(LWLockId lockid, LWLockMode mode)
void
LWLockRelease(LWLockId lockid)
{
LWLock *lock = LWLockArray + lockid;
volatile LWLock *lock = LWLockArray + lockid;
PROC *head;
PROC *proc;
int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment