diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/miscadmin.h | 8 | ||||
-rw-r--r-- | src/include/port/win32.h | 10 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index a2a802cacce..10f75197550 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.180 2005/10/15 02:49:41 momjian Exp $ + * $PostgreSQL: pgsql/src/include/miscadmin.h,v 1.181 2005/10/21 21:43:46 tgl Exp $ * * NOTES * some of the information in this file should be moved to other files. @@ -83,15 +83,17 @@ do { \ if (InterruptPending) \ ProcessInterrupts(); \ } while(0) + #else /* WIN32 */ #define CHECK_FOR_INTERRUPTS() \ do { \ - if (WaitForSingleObjectEx(pgwin32_signal_event,0,TRUE) == WAIT_OBJECT_0) \ - pgwin32_dispatch_queued_signals(); \ + if (UNBLOCKED_SIGNAL_QUEUE()) \ + pgwin32_check_queued_signals(); \ if (InterruptPending) \ ProcessInterrupts(); \ } while(0) + #endif /* WIN32 */ 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); |