l4-hurd
[Top][All Lists]
Advanced

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

libhurd-cap-server: making API compatibility easier


From: Neal H. Walfield
Subject: libhurd-cap-server: making API compatibility easier
Date: Tue, 08 Mar 2005 14:45:11 +0000
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Tue, 08 Mar 2005 14:13:20 +0100,
Ludovic Courtès wrote:
> More generally, there could be class objects available at run-time.
> Like:

I am not entirely clear what you intend.  Do you want to apply this
technique to hurd_cap_obj_t and hurd_cap_class_t?

libhurd-cap-server currently employs an optimization which depends on
knowing the size of the hurd_cap_obj structure at compile time.
Namely, converting from a capability object to a user capability
object (cf. hurd_cap_obj_to_user).  Including an instance size would
eliminate this possibility.  A bit of reflection suggests, however,
that we could take a slightly different approach.  Instead of adding
the size of struct hurd_cap_obj to the pointer, we could subtract the
size of the user object (which would be passed as an argument).

As for the exposing the hurd_cap_class structure, we make the entire
class available so that we can use static initializers.  This could
also be done with run-time constructors albeit a bit more
inconveniently.

Thanks,
Neal





reply via email to

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