Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07eeb9d commit fa72121Copy full SHA for fa72121
src/backend/storage/lmgr/lwlock.c
@@ -15,7 +15,7 @@
15
* Portions Copyright (c) 1994, Regents of the University of California
16
*
17
* IDENTIFICATION
18
- * $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 $
19
20
*-------------------------------------------------------------------------
21
*/
@@ -226,7 +226,8 @@ LWLockId
226
LWLockAssign(void)
227
{
228
LWLockId result;
229
- int *LWLockCounter;
+ /* use volatile pointer to prevent code rearrangement */
230
+ volatile int *LWLockCounter;
231
232
LWLockCounter = (int *) ((char *) LWLockArray - 2 * sizeof(int));
233
SpinLockAcquire(ShmemLock);
0 commit comments