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

Commit19ba229

Browse files
committed
Fix for locking problems an dpriority.
1 parentf0da712 commit19ba229

File tree

1 file changed

+5
-4
lines changed
  • src/backend/storage/lmgr

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.31 1998/02/19 15:04:45 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.32 1998/02/24 19:58:26 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -46,7 +46,7 @@
4646
*This is so that we can support more backends. (system-wide semaphore
4747
*sets run out pretty fast.) -ay 4/95
4848
*
49-
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.31 1998/02/19 15:04:45 momjian Exp $
49+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.32 1998/02/24 19:58:26 momjian Exp $
5050
*/
5151
#include<sys/time.h>
5252
#include<unistd.h>
@@ -451,7 +451,7 @@ ProcSleep(PROC_QUEUE *waitQueue,
451451
intprio,
452452
LOCK*lock)
453453
{
454-
inti=0;
454+
inti;
455455
PROC*proc;
456456
structitimervaltimeval,
457457
dummy;
@@ -481,7 +481,8 @@ ProcSleep(PROC_QUEUE *waitQueue,
481481
proc= (PROC*)MAKE_PTR(waitQueue->links.prev);
482482

483483
/* If we are a reader, and they are writers, skip past them */
484-
while (i++<waitQueue->size&&proc->prio>prio)
484+
485+
for (i=0;i<waitQueue->size&&proc->prio>prio;i++)
485486
proc= (PROC*)MAKE_PTR(proc->links.prev);
486487

487488
/* The rest of the queue is FIFO, with readers first, writers last */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp