Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Date: 2005-10-21 18:47:35
Message-ID: 435937C7.8090801@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Qingqing Zhou wrote:

>"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-10-21 19:01:35 Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak
Previous Message Tom Lane 2005-10-21 18:42:19 Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak