Unix Technical Forum

Re: Can we simplify win32 threading code

This is a discussion on Re: Can we simplify win32 threading code within the pgsql Hackers forums, part of the PostgreSQL category; --> > >>(*) the process who kill the signal: > >> - put the signal in a *shared memory variable ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 05:04 AM
Magnus Hagander
 
Posts: n/a
Default Re: Can we simplify win32 threading code

> >>(*) the process who kill the signal:
> >> - put the signal in a *shared memory variable
> >>pg_signal_queue* and
> >>SetEvent(*shared_memory_event_variable*), then it is done;
> >>
> >>(*) the process who should receive the signal:
> >> - the main thread of this process could be awakened by the

> event from
> >>waiting status(like semop()) or
> >>CHECK_FOR_INTERRUPTS() actively; -- there is no other

> threads of this
> >>process;
> >>
> >>Any show-stop reasons of not doing this?
> >>
> >>

> >
> >Yeah, that should work. With one shared memory segment and one event
> >for each process, of course. The event can be the same one

> as is used
> >now, only it has to be named so it can be accessed externally.

>
>
> I assume that this will not break the use of pg_ctl to
> deliver pseudo-signals. That would be a show-stopper.


It shouldn't, but there is one concern: it has to be created in the
global namespace. On older windows there is no different, but on modern
windows with terminal services in it it does. It might require some
permissions hackings - I don't know what the default permissinos are on
these things. But I *think* it should work fine.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 05:05 AM
Qingqing Zhou
 
Posts: n/a
Default Re: Can we simplify win32 threading code


""Magnus Hagander"" <mha@sollentuna.net> writes
> > I assume that this will not break the use of pg_ctl to
> > deliver pseudo-signals. That would be a show-stopper.

>
> It shouldn't, but there is one concern: it has to be created in the
> global namespace. On older windows there is no different, but on modern
> windows with terminal services in it it does. It might require some
> permissions hackings - I don't know what the default permissinos are on
> these things. But I *think* it should work fine.
>


Yes, the mutex/event stuff should be in the global namespace. What do you
mean the permission hacks?

Regards,
Qingqing


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:44 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com