Skip to content

Commit 48b2802

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 grep hit the wrong files, so I figured a simple patch was in order.. (other refs in the same comment block was changed..) Magnus Hagander
1 parent 24614a9 commit 48b2802

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(volatile slock_t *lock, const char *file, int line)
4646
{
4747
/*
48-
* We loop tightly for awhile, then delay using select() and try
48+
* We loop tightly for awhile, then delay using pg_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 increasing select()
56+
* Once we do decide to block, we use randomly increasing pg_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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy