l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

abstraction layer where?


From: Marcus Brinkmann
Subject: abstraction layer where?
Date: Sun, 18 May 2003 04:12:28 +0200
User-agent: Mutt/1.5.3i

Hi,

do we want to use a common (or at least very similar) interface definition
for Hurd on Mach, on L4 and what not?  Because I was thinking that if we
write different interfaces, we can do better optimization and hide the
differences in the libraries.

For example, auth returns four arrays.  On L4 I am tempted to just put a
limit of 62 for nr_egids + nr_agids + nr_euids + nr_auids and define the
get_ids interface to

Input:  MR1  obj id
       [MR2  user id - optional for optimization of auth interface, see
             my last mail to l4-hurd]

Output: MR1: (nr_agids << 24) | (nr_egids << 16) | (nr_auids << 8) | nr_euids
        MR2: first euid
        MR3: second euid
        ...
(listing first all euids, then all auids, then all egids and then all
agids).

If we need more ids, then we can always make this call fail quickly and let
the user follow up with a different call that uses string items and cache
lines or mapped memory.  But normally 62 should be plenty.

I am thinking about such stuff and realize that this could be difficult to
express in an IDL.  However, it might be worthwhile to hand optimize at
least some central servers this way, ie auth, proc, etc.  The C interface
(ie, libhurduser) could in this case even be identical to the current one
(except with the optional MR2 input arg).  We have various libraries,
libps, libiohelp, libfshelp etc which can further hide the differences.

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    address@hidden
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
address@hidden
http://www.marcus-brinkmann.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]