diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-12 16:55:59 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-12 16:55:59 +0000 |
commit | fa72121594534dda6cc010f0bf6b3e8d22987526 (patch) | |
tree | 388be7ec2c46e6d591c827a27089fbc10b5e0323 /src | |
parent | 07eeb9d109c057854b20707562ce517efa591761 (diff) | |
download | postgresql-fa72121594534dda6cc010f0bf6b3e8d22987526.tar.gz postgresql-fa72121594534dda6cc010f0bf6b3e8d22987526.zip |
Fix another recently-changed place that was messing with spinlock-
protected data structures and not using a volatile pointer for same.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/lmgr/lwlock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index 8b7565a6aa7..ce0606a3c4e 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.32 2005/10/07 21:42:38 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.33 2005/10/12 16:55:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -226,7 +226,8 @@ LWLockId LWLockAssign(void) { LWLockId result; - int *LWLockCounter; + /* use volatile pointer to prevent code rearrangement */ + volatile int *LWLockCounter; LWLockCounter = (int *) ((char *) LWLockArray - 2 * sizeof(int)); SpinLockAcquire(ShmemLock); |