[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mach_port_t vs task_t (really ipc_space_t) in Mach header files
From: |
Farid Hajji |
Subject: |
Re: mach_port_t vs task_t (really ipc_space_t) in Mach header files |
Date: |
Fri, 28 Sep 2001 01:23:25 +0200 (CEST) |
Hi Marcus,
> I saw that the defs file have nice specific types like ipc_space_t and
> mach_port_name_t, but the C header files almost all have mach_port_t for
> them. In the Hurd, we have a typedef for each of these types and keep
> them in the header. We even use task_t in proc etc.
>
> I am now using mach_port_t in mach.texi everywhere (where it is used in the
> generated C header file), rather than the more explicit type in the defs
> file. But maybe we don't want that?
I've stumbled across this problem as I tried to convert some *.defs
to omg-idl. Since IDL is a strongly typed interface definition language,
keeping the more specific types seemed more sensible in a first try
(you could simply typedef those types away to mach_port_t).
Two questions:
* are the more specific types at least _consistently_ used?
I doubt this is the case: a lot of files simply fall back to
mach_port_t later
* are they really needed for architectural reasons, or, more
precisely, for better readability? In the Mach case, I'd
guess "maybe no," but on non-Mach VKs, that could well be
a different matter.
Actually, I didn't find the specific types in the *.defs very helpful
for drawing clean lines of abstractions. They seem to have been added
as an afterthought, but were propagated to the bulk sources very
half-heartedly, if at all. So if you're going to remove them, that
would be okay with me (IMHO).
At least, as far as _mach.texi_ is concerned, it may be okay, but
please remain consistent with Mach headers ;-)
What do others think?
-Farid.
--
Farid Hajji -- Unix Systems and Network Admin | Phone: +49-2131-67-555
Broicherdorfstr. 83, D-41564 Kaarst, Germany | farid.hajji@ob.kamp.net
- - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -
One OS To Rule Them All And In The Darkness Bind Them... --Bill Gates.