Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa72121

Browse files
committed
Fix another recently-changed place that was messing with spinlock-
protected data structures and not using a volatile pointer for same.
1 parent07eeb9d commitfa72121

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/storage/lmgr/lwlock.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Portions Copyright (c) 1994, Regents of the University of California
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.32 2005/10/07 21:42:38 tgl Exp $
18+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.33 2005/10/12 16:55:59 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -226,7 +226,8 @@ LWLockId
226226
LWLockAssign(void)
227227
{
228228
LWLockIdresult;
229-
int*LWLockCounter;
229+
/* use volatile pointer to prevent code rearrangement */
230+
volatileint*LWLockCounter;
230231

231232
LWLockCounter= (int*) ((char*)LWLockArray-2*sizeof(int));
232233
SpinLockAcquire(ShmemLock);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp