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.
This commit is contained in:
parent
53016fa55c
commit
584f818bef
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user