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

Commit7e03e3f

Browse files
committed
Remove more obsolete comments about semaphores.
Commit6753333 stopped using semaphores as the sleep/wake mechanism forheavyweight locks, but some obsolete references to that scheme remainedin comments. As with similar commit25b93a2, back-patch all the way.Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://postgr.es/m/CA%2BhUKGLafjB1uzXcy%3D%3D2L3cy7rjHkqOVn7qRYGBjk%3D%3DtMJE7Yg%40mail.gmail.com
1 parent137af4f commit7e03e3f

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

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

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,14 +1221,10 @@ LWLockAcquire(LWLock *lock, LWLockMode mode)
12211221
/*
12221222
* Wait until awakened.
12231223
*
1224-
* Since we share the process wait semaphore with the regular lock
1225-
* manager and ProcWaitForSignal, and we may need to acquire an LWLock
1226-
* while one of those is pending, it is possible that we get awakened
1227-
* for a reason other than being signaled by LWLockRelease. If so,
1228-
* loop back and wait again. Once we've gotten the LWLock,
1229-
* re-increment the sema by the number of additional signals received,
1230-
* so that the lock manager or signal manager will see the received
1231-
* signal when it next waits.
1224+
* It is possible that we get awakened for a reason other than being
1225+
* signaled by LWLockRelease. If so, loop back and wait again. Once
1226+
* we've gotten the LWLock, re-increment the sema by the number of
1227+
* additional signals received.
12321228
*/
12331229
LOG_LWDEBUG("LWLockAcquire",lock,"waiting");
12341230

@@ -1388,8 +1384,7 @@ LWLockAcquireOrWait(LWLock *lock, LWLockMode mode)
13881384
{
13891385
/*
13901386
* Wait until awakened. Like in LWLockAcquire, be prepared for
1391-
* bogus wakeups, because we share the semaphore with
1392-
* ProcWaitForSignal.
1387+
* bogus wakeups.
13931388
*/
13941389
LOG_LWDEBUG("LWLockAcquireOrWait",lock,"waiting");
13951390

@@ -1598,14 +1593,10 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval)
15981593
/*
15991594
* Wait until awakened.
16001595
*
1601-
* Since we share the process wait semaphore with the regular lock
1602-
* manager and ProcWaitForSignal, and we may need to acquire an LWLock
1603-
* while one of those is pending, it is possible that we get awakened
1604-
* for a reason other than being signaled by LWLockRelease. If so,
1605-
* loop back and wait again. Once we've gotten the LWLock,
1606-
* re-increment the sema by the number of additional signals received,
1607-
* so that the lock manager or signal manager will see the received
1608-
* signal when it next waits.
1596+
* It is possible that we get awakened for a reason other than being
1597+
* signaled by LWLockRelease. If so, loop back and wait again. Once
1598+
* we've gotten the LWLock, re-increment the sema by the number of
1599+
* additional signals received.
16091600
*/
16101601
LOG_LWDEBUG("LWLockWaitForVar",lock,"waiting");
16111602

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp