Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak
Date
Msg-id 25762.1129929284@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Responses Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak
List pgsql-hackers
BTW, expanding on Andrew's comment, ISTM we could move the kernel call
out of the macro, ie make it look like

#define CHECK_FOR_INTERRUPTS() \
do { \   if (UNBLOCKED_SIGNAL_QUEUE()) \       pgwin32_check_queued_signals(); \   if (InterruptPending) \
ProcessInterrupts();\
 
} while(0)

where pgwin32_check_queued_signals() is just
   if (WaitForSingleObjectEx(pgwin32_signal_event,0,TRUE) == WAIT_OBJECT_0)       pgwin32_dispatch_queued_signals();

This would save a few bytes at each call site while not really costing
anything in performance.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Qingqing Zhou
Date:
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Next
From: Tom Lane
Date:
Subject: Re: Seeing context switch storm with 10/13 snapshot of