From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Question on win32 semaphore simulation |
Date: | 2006-04-18 14:52:36 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCEA352B9@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
> > Looking at the code, it looks fairly complex to me. I don't really
> > know how sysv semaphores are supposed to work, or how we
> use them, but
> > perhaps the whole piece of code can be simplified?
>
> I'm not sure why the win32 port chose to emulate the SysV
> semaphore interface anyway. You could equally well have used
> the Posix interface (src/backend/port/posix_sema.c). Or,
> given Microsoft's NIH tendencies, you might have needed to
> write a third implementation of the pg_sema.h interface ...
> but it'd likely still be no larger than win32/sema.c ...
I think that's a leftover from that code coming from a time when we
didn't have an abstraction for semaphores. Specifically, it may have
come out of the peerdirect port with was IIRC 7.3.
Going with the third option might be a good idea - win32 *does* have
native semaphores, and most of the work appears to be first adapting our
need to sysv, then adapting sysv to win32. Worth looking at I guess.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-04-18 15:16:33 | Re: CVS tags |
Previous Message | Tom Lane | 2006-04-18 14:14:37 | Re: Question on win32 semaphore simulation |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Brant | 2006-04-18 15:42:43 | Re: [Win32] Problem with rename() |
Previous Message | Tom Lane | 2006-04-18 14:50:58 | Re: [Win32] Problem with rename() |