bug-hurd
[Top][All Lists]
Advanced

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

Re: 64bit GNU Mach


From: Richard Braun
Subject: Re: 64bit GNU Mach
Date: Mon, 2 Apr 2012 15:44:20 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Apr 02, 2012 at 03:21:06PM +0200, Samuel Thibault wrote:
> Because there is code in GNU Mach that uses mach_port_t as a pointer,
> see e.g. kdportdeath(), which just casts mach_port_t into ipc_port_t, or
> ipc_kmsg_copyin_header which casts back the just-resolved object into
> mach_port_t. Such code might have to simply use the ipc_port_t type
> instead, I don't know. What I know for sure, however, is that xnu does
> typedef ipc_port_t mach_port_t, which makes me tend to think that in the
> kernel, mach_port_t is supposed to be a pointer, while mach_port_name_t
> is for the port names.

Keeping names-to-pointer casts wouldn't be the cleanest way, but it
may save some effort. Using ipc_port_t seems better to me, but as it's
completely internal to the kernel, it doesn't matter much. To answer
your inital question, yes, it doesn't hurt much and makes sense to use
a 32-bit type for port names, whatever the word size.

-- 
Richard Braun



reply via email to

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