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

Commit8d48a34

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 parent6de3a21 commit8d48a34

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
@@ -1302,14 +1302,10 @@ LWLockAcquire(LWLock *lock, LWLockMode mode)
13021302
/*
13031303
* Wait until awakened.
13041304
*
1305-
* Since we share the process wait semaphore with the regular lock
1306-
* manager and ProcWaitForSignal, and we may need to acquire an LWLock
1307-
* while one of those is pending, it is possible that we get awakened
1308-
* for a reason other than being signaled by LWLockRelease. If so,
1309-
* loop back and wait again. Once we've gotten the LWLock,
1310-
* re-increment the sema by the number of additional signals received,
1311-
* so that the lock manager or signal manager will see the received
1312-
* signal when it next waits.
1305+
* It is possible that we get awakened for a reason other than being
1306+
* signaled by LWLockRelease. If so, loop back and wait again. Once
1307+
* we've gotten the LWLock, re-increment the sema by the number of
1308+
* additional signals received.
13131309
*/
13141310
LOG_LWDEBUG("LWLockAcquire",lock,"waiting");
13151311

@@ -1474,8 +1470,7 @@ LWLockAcquireOrWait(LWLock *lock, LWLockMode mode)
14741470
{
14751471
/*
14761472
* Wait until awakened. Like in LWLockAcquire, be prepared for
1477-
* bogus wakeups, because we share the semaphore with
1478-
* ProcWaitForSignal.
1473+
* bogus wakeups.
14791474
*/
14801475
LOG_LWDEBUG("LWLockAcquireOrWait",lock,"waiting");
14811476

@@ -1688,14 +1683,10 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval)
16881683
/*
16891684
* Wait until awakened.
16901685
*
1691-
* Since we share the process wait semaphore with the regular lock
1692-
* manager and ProcWaitForSignal, and we may need to acquire an LWLock
1693-
* while one of those is pending, it is possible that we get awakened
1694-
* for a reason other than being signaled by LWLockRelease. If so,
1695-
* loop back and wait again. Once we've gotten the LWLock,
1696-
* re-increment the sema by the number of additional signals received,
1697-
* so that the lock manager or signal manager will see the received
1698-
* signal when it next waits.
1686+
* It is possible that we get awakened for a reason other than being
1687+
* signaled by LWLockRelease. If so, loop back and wait again. Once
1688+
* we've gotten the LWLock, re-increment the sema by the number of
1689+
* additional signals received.
16991690
*/
17001691
LOG_LWDEBUG("LWLockWaitForVar",lock,"waiting");
17011692

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp