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

Commit06c120e

Browse files
committed
Update for deadlock timer.
1 parent2b8736b commit06c120e

File tree

1 file changed

+10
-11
lines changed
  • src/backend/storage/lmgr

1 file changed

+10
-11
lines changed

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

Lines changed: 10 additions & 11 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.45 1998/12/29 18:29:18 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.46 1998/12/29 18:36:29 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.45 1998/12/29 18:29:18 momjian Exp $
49+
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.46 1998/12/29 18:36:29 momjian Exp $
5050
*/
5151
#include<sys/time.h>
5252
#include<unistd.h>
@@ -520,20 +520,19 @@ ProcSleep(PROC_QUEUE *waitQueue,/* lock->waitProcs */
520520

521521
do
522522
{
523-
intexpired;
524-
525523
MyProc->errType=NO_ERROR;/* reset flag after deadlock check */
526524

527525
if (deadlock_checked== false)
528-
expired=sleep(DeadlockCheckTimer ?DeadlockCheckTimer :DEADLOCK_CHECK_TIMER);
529-
else
530-
pause();
531-
532-
if (expired==0&&deadlock_checked== false)
533526
{
534-
HandleDeadLock();
535-
deadlock_checked= true;
527+
if (sleep(DeadlockCheckTimer ?DeadlockCheckTimer :DEADLOCK_CHECK_TIMER)
528+
==0/* no signal interruption */ )
529+
{
530+
HandleDeadLock();
531+
deadlock_checked= true;
532+
}
536533
}
534+
else
535+
pause();
537536

538537
/* --------------
539538
* if someone wakes us between SpinRelease and IpcSemaphoreLock,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp