win32 setitimer implementation
Hello!
Here is a patch that implements setitimer() on win32. With this patch
applied, deadlock detection and statement_timeout now works.
The file timer.c goes into src/backend/port/win32/.
The patch also removes two lines of "printf debugging" accidentally left
in pqsignal.h, in the console control handler.
//Magnus
<<win32_setitimer.patch>> <<timer.c>>
Here is a patch that implements setitimer() on win32. With this patch
applied, deadlock detection and statement_timeout now works.The file timer.c goes into src/backend/port/win32/.
Minor comments:
* "timer.c" has shmem.c in header
* I'd suggest Asserts on the remaining 2 limitations ("zero" it_interval and
NULL ovalue), on the off chance that some future change to the source
expects them (ie. so we'll find out about it under win32 pretty quickly);
possibly provide defines of ITIMER_VIRT and ITIMER_PROF, for completeness.
Looks good,
Claudio
---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>
Import Notes
Resolved by subject fallback
Ok, here's an updated timer.c that fixes these concerns and also adds a
$postgresql$ header to the file.
It also removes the check if value == NULL, since that is now Asserted
instead. And it really should never happen based on the places where
setitimer is used.
The patch stays unchanged, just a new timer.c
//Magnus
Show quoted text
-----Original Message-----
From: Claudio Natoli [mailto:claudio.natoli@memetrics.com]
Sent: den 17 februari 2004 12:25
To: Magnus Hagander; pgsql-patches@postgresql.org;
pgsql-hackers-win32@postgresql.org
Subject: RE: [pgsql-hackers-win32] win32 setitimer implementationHere is a patch that implements setitimer() on win32. With
this patch
applied, deadlock detection and statement_timeout now works.
The file timer.c goes into src/backend/port/win32/.
Minor comments:
* "timer.c" has shmem.c in header
* I'd suggest Asserts on the remaining 2 limitations ("zero"
it_interval and NULL ovalue), on the off chance that some
future change to the source expects them (ie. so we'll find
out about it under win32 pretty quickly); possibly provide
defines of ITIMER_VIRT and ITIMER_PROF, for completeness.Looks good,
Claudio--- Certain disclaimers and policies apply to all email sent from Memetrics. For the full text of these disclaimers and policies see <a href="http://www.memetrics.com/emailpolicy.html">http://www.mem etrics.com/em ailpolicy.html</a>
Attachments:
Import Notes
Resolved by subject fallback
Patch applied with newer version is timer.c. Thanks.
---------------------------------------------------------------------------
Magnus Hagander wrote:
Hello!
Here is a patch that implements setitimer() on win32. With this patch
applied, deadlock detection and statement_timeout now works.The file timer.c goes into src/backend/port/win32/.
The patch also removes two lines of "printf debugging" accidentally left
in pqsignal.h, in the console control handler.//Magnus
<<win32_setitimer.patch>> <<timer.c>>
Content-Description: win32_setitimer.patch
[ Attachment, skipping... ]
Content-Description: timer.c
[ Attachment, skipping... ]
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073