projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25fd03d
)
At least on HPUX, select with delay.tv_sec = 0 and delay.tv_usec = 1000000
author
Tom Lane
<tgl@sss.pgh.pa.us>
Sat, 24 Feb 2001 22:42:45 +0000
(22:42 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Sat, 24 Feb 2001 22:42:45 +0000
(22:42 +0000)
does not lead to a one-second delay, but to an immediate EINVAL failure.
This causes CHECKPOINT to crash with s_lock_stuck much too quickly :-(.
Fix by breaking down the requested wait div/mod 1e6.
src/backend/storage/buffer/s_lock.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/storage/buffer/s_lock.c
b/src/backend/storage/buffer/s_lock.c
index 4cbc0ca55128f1f84215a5fd3372d09b9c5036a5..ae9e7c542d820e307b7ef0fcd667673f83e8c661 100644
(file)
--- a/
src/backend/storage/buffer/s_lock.c
+++ b/
src/backend/storage/buffer/s_lock.c
@@
-91,8
+91,8
@@
s_lock_sleep(unsigned spins, int timeout, int microsec,
if (microsec > 0)
{
- delay.tv_sec = 0;
- delay.tv_usec = microsec;
+ delay.tv_sec =
microsec / 100000
0;
+ delay.tv_usec = microsec
% 1000000
;
}
else
{