|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * 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 $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
|
46 | 46 | *This is so that we can support more backends. (system-wide semaphore
|
47 | 47 | *sets run out pretty fast.) -ay 4/95
|
48 | 48 | *
|
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 $ |
50 | 50 | */
|
51 | 51 | #include<sys/time.h>
|
52 | 52 | #include<unistd.h>
|
@@ -451,7 +451,7 @@ ProcSleep(PROC_QUEUE *waitQueue,
|
451 | 451 | intprio,
|
452 | 452 | LOCK*lock)
|
453 | 453 | {
|
454 |
| -inti=0; |
| 454 | +inti; |
455 | 455 | PROC*proc;
|
456 | 456 | structitimervaltimeval,
|
457 | 457 | dummy;
|
@@ -481,7 +481,8 @@ ProcSleep(PROC_QUEUE *waitQueue,
|
481 | 481 | proc= (PROC*)MAKE_PTR(waitQueue->links.prev);
|
482 | 482 |
|
483 | 483 | /* 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++) |
485 | 486 | proc= (PROC*)MAKE_PTR(proc->links.prev);
|
486 | 487 |
|
487 | 488 | /* The rest of the queue is FIFO, with readers first, writers last */
|
|