Re: BeOS and IPC - try 999

Поиск
Список
Период
Сортировка
От Adam Haberlach
Тема Re: BeOS and IPC - try 999
Дата
Msg-id 20000614111246.B8368@ricochet.net
обсуждение исходный текст
Ответ на Re: BeOS and IPC - try 999  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
On Wed, Jun 14, 2000 at 12:35:44PM -0400, Tom Lane wrote:
> "David Reid" <david@jetnet.co.uk> writes:
> > OK, agreed (up to a point).  So, you want easier maintenance?  The ONLY
> > way that I can think of doing it is to have the platform specific IPC
> > stuff in it's own file, hence this patch.  The core functions, the ones
> > that have no platform specific code in them, still live in ipc.c but all
> > the functions that are touched by platform code live in either
> > ipc_unix.c or ipc_beos.c.
>
> This is a step forward from what you had, for sure.  I'm not sure if
> the separate-files approach is really good, though, compared to
> a pattern like
>
> int IPCFunction()
> {
> #ifdef BEOS
>     BEOS code
> #else
>     unix code
> #endif
> }
>
> for each function.  The thing that scares me about separate files
> is the out-of-sight, out-of-mind problem: if you make a change
> in one file, will you remember to update the corresponding code
> in the other files (if there is any)?

> Comments anyone?

    Hrm--we already do this sort of thing for the dynaloader
functions, I assume for much the same reason (very different
interfaces on different systems).  It is also somewhat unlikely
that someone modifying the IPC API for one system is going to
be able (or at least willing) to update the functions for other
platforms.  On the other hand, basic IPC hasn't changed much
from semaphore/shared memory for quite a while.

--
Adam Haberlach             |"You have to understand that the
adam@newsnipple.com        |  entire 'Net is based on people with
http://www.newsnipple.com/ |  too much free time on their hands."

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BeOS and IPC - try 999
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: filename patch (was Re: [HACKERS] Big 7.1 open items)