Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak
Date: 2005-10-21 19:01:35
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE92E764@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Shall we add "volatile" quanlifier to at least pg_signal_queue?
>
> If that's changed by a separate thread, "volatile" seems essential.
> What about the mask variable?

Yes, that does seem right. Previously it would never be concurrently
modified, because it was always locked by the critical section, but now
we read it without locking, and we certainly don't want that optimized
away.

The mask is only ever written by the main thread, never by the signal
dispatching thread. So I think that one could do without.

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2005-10-21 19:30:50 Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak
Previous Message Andrew Dunstan 2005-10-21 18:47:35 Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance