diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2022-11-30 02:14:20 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-11-30 22:26:30 +0100 |
commit | 958686efa2175abe3f7044890c2c2370e29147f2 (patch) | |
tree | f4052284d57e063d7f1b3583a3b8a387cba0cd3f /kern/thread.h | |
parent | 0afd533bfef628d0ef8476bbaaab78c6a1336873 (diff) | |
download | gnumach-958686efa2175abe3f7044890c2c2370e29147f2.tar.gz gnumach-958686efa2175abe3f7044890c2c2370e29147f2.tar.bz2 gnumach-958686efa2175abe3f7044890c2c2370e29147f2.zip |
Update ipc/ directory to use mach_port_name_t
Make it explicit where we use port names versus actual ports. For the 64
bit kernel, port names and ports are of different size so this corrects
the syscall arguments and internal structs to have the right size.
This patch also uncovered several issues we need to solve to make
GNUMach work well on 64 bits. First, the mach_msg call will receive 4
byte port names while the kernel "thinks" they are 8 bytes, which will
be a problem. Also, when we send a message, the kernel translates the
port names into port pointers in the message copied from user space.
This also won't work on 64 bits. In this patch, I added several TODOs to fix
the issues later.
Message-Id: <Y4cCzNmc6vC4bjsX@viriathus>
Diffstat (limited to 'kern/thread.h')
-rw-r--r-- | kern/thread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/thread.h b/kern/thread.h index ddf4e1da..da8bd2ed 100644 --- a/kern/thread.h +++ b/kern/thread.h @@ -172,7 +172,7 @@ struct thread { struct ipc_port *ith_sself; /* a send right */ struct ipc_port *ith_exception; /* a send right */ - mach_port_t ith_mig_reply; /* reply port for mig */ + mach_port_name_t ith_mig_reply; /* reply port for mig */ struct ipc_port *ith_rpc_reply; /* reply port for kernel RPCs */ /* State saved when thread's stack is discarded */ @@ -182,7 +182,7 @@ struct thread { mach_msg_option_t option; mach_msg_size_t rcv_size; mach_msg_timeout_t timeout; - mach_port_t notify; + mach_port_name_t notify; struct ipc_object *object; struct ipc_mqueue *mqueue; } receive; |