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

Commit48b2802

Browse files
committed
When changing select() calls for delays into pg_usleep(), two comments
in s_lock.c were not updated, and still refers to select. Made my grephit the wrong files, so I figured a simple patch was in order.. (otherrefs in the same comment block was changed..)Magnus Hagander
1 parent24614a9 commit48b2802

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.26 2004/03/15 16:18:43 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.27 2004/03/23 21:39:46 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -45,15 +45,15 @@ void
4545
s_lock(volatileslock_t*lock,constchar*file,intline)
4646
{
4747
/*
48-
* We loop tightly for awhile, then delay usingselect() and try
48+
* We loop tightly for awhile, then delay usingpg_usleep() and try
4949
* again. Preferably, "awhile" should be a small multiple of the
5050
* maximum time we expect a spinlock to be held. 100 iterations seems
5151
* about right. In most multi-CPU scenarios, the spinlock is probably
5252
* held by a process on another CPU and will be released before we
5353
* finish 100 iterations. However, on a uniprocessor, the tight loop
5454
* is just a waste of cycles, so don't iterate thousands of times.
5555
*
56-
* Once we do decide to block, we use randomly increasingselect()
56+
* Once we do decide to block, we use randomly increasingpg_usleep()
5757
* delays. The first delay is 10 msec, then the delay randomly
5858
* increases to about one second, after which we reset to 10 msec and
5959
* start again. The idea here is that in the presence of heavy

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp