This is a discussion on Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak within the pgsql Hackers forums, part of the PostgreSQL category; --> > > Shall we add "volatile" quanlifier to at least pg_signal_queue? > > If that's changed by a separate ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > > 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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| ||||
| On Fri, 21 Oct 2005, Magnus Hagander wrote: > > > 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. > Agreed. Regards, Qingqing |
| Thread Tools | |
| Display Modes | |
|
|