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

From Andrew Dunstan
Subject Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Date
Msg-id 435937C7.8090801@dunslane.net
Whole thread Raw
In response to Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Responses Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
List pgsql-hackers

Qingqing Zhou wrote:

>"Tom Lane" <tgl@sss.pgh.pa.us> wrote
>  
>
>>... so definitely worth fixing for 8.1 if we can convince ourselves
>>it's correct.
>>
>>    
>>
>
>Despite the performance, there is one thing I am not exactly sure. Shall we 
>add "volatile" quanlifier to at least pg_signal_queue? The dangerous place 
>is PGSemaphoreLock(). If the compiler cache this value somehow, then we are 
>in trouble, but the original way (check event directly) does not have this 
>problem.
>
>
>  
>
The fact this question is asked worries me a bit.

Also, I have a small style question - why use a nested if instead of 
just saying
 if (UNBLOCKED_SIGNAL_QUEUE() && WaitForSingleObjectEx(pgwin32_signal_event,0,TRUE) == WAIT_OBJECT_0)

?

cheers

andrew




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak
Next
From: "Magnus Hagander"
Date:
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak