Re: BeOS and IPC - try 999 - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: BeOS and IPC - try 999
Date
Msg-id Pine.LNX.4.21.0006161431260.17284-100000@localhost.localdomain
Whole thread Raw
In response to BeOS and IPC - try 999  ("David Reid" <david@jetnet.co.uk>)
List pgsql-patches
David Reid 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.

What I was thinking about is that you essentially create a wrapper library
of SysV-like functions that call the BEOS-specific functions, like

int
semctl(int semid, int semnum, int cmd, union semun arg)
{
    switch (cmd)
    {
        case IPC_RMID:
            delete_sem(semid);
            break;
    ...
    }
}


int
semget(key_t key, int nsems, int semflg)
{
    create_sem(...);
}

etc. That way there's essentially zero maintenance overhead for both the
Unix and the Beos factions. And you'd be doing yourself and the world a
big favour when you're trying to port the next IPC heavy program.


--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-patches by date:

Previous
From: Giles Lean
Date:
Subject: Re: Re: [PORTS] Locale bug
Next
From: "David Reid"
Date:
Subject: Re: Re: BeOS and IPC - try 999