aboutsummaryrefslogtreecommitdiff
path: root/src/include/port/win32.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-10-21 21:43:46 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-10-21 21:43:46 +0000
commit6aad07d270ca2ba42c3083daf7bd640c272ecd4c (patch)
treed7279cbc7c4d3f5ad1dca58f49efa024f6dc6072 /src/include/port/win32.h
parentfdff883aca7f13660d01e708f38bfb105c3c7872 (diff)
downloadpostgresql-6aad07d270ca2ba42c3083daf7bd640c272ecd4c.tar.gz
postgresql-6aad07d270ca2ba42c3083daf7bd640c272ecd4c.zip
Improve performance of CHECK_FOR_INTERRUPTS() macro on Windows by not doing
a kernel call unless there's some evidence of a pending signal. This should bring its performance on Windows into line with the Unix version. Problem diagnosis and patch by Qingqing Zhou. Minor stylistic tweaks by moi ... if it's broken, it's my fault.
Diffstat (limited to 'src/include/port/win32.h')
-rw-r--r--src/include/port/win32.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h
index 44c449443a2..9d1a6da6c6c 100644
--- a/src/include/port/win32.h
+++ b/src/include/port/win32.h
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.47 2005/10/15 02:49:45 momjian Exp $ */
+/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.48 2005/10/21 21:43:46 tgl Exp $ */
/* undefine and redefine after #include */
#undef mkdir
@@ -214,11 +214,17 @@ typedef int pid_t;
/* In backend/port/win32/signal.c */
-extern DLLIMPORT HANDLE pgwin32_signal_event;
+extern DLLIMPORT volatile int pg_signal_queue;
+extern DLLIMPORT int pg_signal_mask;
+extern HANDLE pgwin32_signal_event;
extern HANDLE pgwin32_initial_signal_pipe;
+#define UNBLOCKED_SIGNAL_QUEUE() (pg_signal_queue & ~pg_signal_mask)
+
+
void pgwin32_signal_initialize(void);
HANDLE pgwin32_create_signal_listener(pid_t pid);
+void pgwin32_check_queued_signals(void);
void pgwin32_dispatch_queued_signals(void);
void pg_queue_signal(int signum);