summaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/lwlock.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2021-07-09 17:51:48 +1200
committerThomas Munro <tmunro@postgresql.org>2021-07-09 18:04:24 +1200
commit2f783380641db4cc598acd108186a446e4919290 (patch)
tree61286503df5d2f45bf9cb9bf35ab234221d7b488 /src/backend/storage/lmgr/lwlock.c
parent56ff8b29919f75a078969766393b9e20871a75c8 (diff)
downloadpostgresql-2f783380641db4cc598acd108186a446e4919290.tar.gz
Remove more obsolete comments about semaphores.
Commit 6753333f stopped using semaphores as the sleep/wake mechanism for heavyweight locks, but some obsolete references to that scheme remained in comments. As with similar commit 25b93a29, 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
Diffstat (limited to 'src/backend/storage/lmgr/lwlock.c')
-rw-r--r--src/backend/storage/lmgr/lwlock.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c
index ffb6fa36cc..862097352b 100644
--- a/src/backend/storage/lmgr/lwlock.c
+++ b/src/backend/storage/lmgr/lwlock.c
@@ -1298,14 +1298,10 @@ LWLockAcquire(LWLock *lock, LWLockMode mode)
/*
* Wait until awakened.
*
- * Since we share the process wait semaphore with the regular lock
- * manager and ProcWaitForSignal, and we may need to acquire an LWLock
- * while one of those is pending, it is possible that we get awakened
- * for a reason other than being signaled by LWLockRelease. If so,
- * loop back and wait again. Once we've gotten the LWLock,
- * re-increment the sema by the number of additional signals received,
- * so that the lock manager or signal manager will see the received
- * signal when it next waits.
+ * It is possible that we get awakened for a reason other than being
+ * signaled by LWLockRelease. If so, loop back and wait again. Once
+ * we've gotten the LWLock, re-increment the sema by the number of
+ * additional signals received.
*/
LOG_LWDEBUG("LWLockAcquire", lock, "waiting");
@@ -1470,8 +1466,7 @@ LWLockAcquireOrWait(LWLock *lock, LWLockMode mode)
{
/*
* Wait until awakened. Like in LWLockAcquire, be prepared for
- * bogus wakeups, because we share the semaphore with
- * ProcWaitForSignal.
+ * bogus wakeups.
*/
LOG_LWDEBUG("LWLockAcquireOrWait", lock, "waiting");
@@ -1684,14 +1679,10 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval)
/*
* Wait until awakened.
*
- * Since we share the process wait semaphore with the regular lock
- * manager and ProcWaitForSignal, and we may need to acquire an LWLock
- * while one of those is pending, it is possible that we get awakened
- * for a reason other than being signaled by LWLockRelease. If so,
- * loop back and wait again. Once we've gotten the LWLock,
- * re-increment the sema by the number of additional signals received,
- * so that the lock manager or signal manager will see the received
- * signal when it next waits.
+ * It is possible that we get awakened for a reason other than being
+ * signaled by LWLockRelease. If so, loop back and wait again. Once
+ * we've gotten the LWLock, re-increment the sema by the number of
+ * additional signals received.
*/
LOG_LWDEBUG("LWLockWaitForVar", lock, "waiting");