summaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/proc.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1999-04-30 02:04:51 +0000
committerBruce Momjian <bruce@momjian.us>1999-04-30 02:04:51 +0000
commit52f1b2f3b6c8e6f8b04abb2beba264b23f9eeb83 (patch)
treede1f66940d1d3da6ee96a8fe175b1c2eadf87ca9 /src/backend/storage/lmgr/proc.c
parent7d62e9c719ec9eaf1d47a5149ae5e0a31d1029c8 (diff)
Prevent priority inversion in locking by checking for existing locks
before going into queue behind person with higher piority.
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r--src/backend/storage/lmgr/proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index cc5233b0764..229a78587cb 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.52 1999/03/28 20:32:26 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.53 1999/04/30 02:04:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.52 1999/03/28 20:32:26 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.53 1999/04/30 02:04:51 momjian Exp $
*/
#include <sys/time.h>
#include <unistd.h>
@@ -516,8 +516,7 @@ ProcSleep(PROC_QUEUE *waitQueue,/* lock->waitProcs */
* In a full queue, we would have a reader holding a lock, then a writer
* gets the lock, then a bunch of readers, made up of readers who
* could not share the first readlock because a writer was waiting,
- * and new readers arriving while the writer had the lock.
- *
+ * and new readers arriving while the writer had the lock. bjm
*/
proc = (PROC *) MAKE_PTR(waitQueue->links.prev);