From fc6bcf785b702e7e8a675ea0fe9856cc1b24b8f6 Mon Sep 17 00:00:00 2001 From: Luca Dariz Date: Mon, 16 Jan 2023 11:58:57 +0100 Subject: replace mach_port_t with mach_port_name_t This is a cleanup following the introduction of mach_port_name_t. The same set of changes is applied to all files: - rename mach_port_t to mach_port_name_t where a port name is used, - use MACH_PORT_NAME_NULL and MACH_PORT_NAME_DEAD where appropriate, - use invalid_port_to_name() and invalid_name_to_port() for conversion where appropriate, - use regular copyout() insted of copyout_port() when we deal with mach_port_name_t already before copyout, - use the new helper ipc_kmsg_copyout_object_to_port() when we really want to place a port name in the space of a mach_port_t. * include/mach/notify.h: Likewise * ipc/ipc_entry.c: Likewise * ipc/ipc_kmsg.c: Likewise * ipc/ipc_kmsg.h: Likewise, and add ipc_kmsg_copyout_object_to_port() * ipc/ipc_marequest.c: Likewise * ipc/ipc_object.c: Likewise * ipc/ipc_port.c: Likewise * ipc/ipc_space.h: Likewise * ipc/mach_msg.c: Likewise * ipc/mach_port.c: Likewise * kern/exception.c: Likewise * kern/ipc_mig.c: Likewise Message-Id: <20230116105857.240210-8-luca@orpolo.org> --- include/mach/notify.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mach/notify.h b/include/mach/notify.h index 6d783dde..14bcd6f6 100644 --- a/include/mach/notify.h +++ b/include/mach/notify.h @@ -58,13 +58,13 @@ typedef struct { mach_msg_header_t not_header; mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_NAME */ - mach_port_t not_port; + mach_port_name_t not_port; } mach_port_deleted_notification_t; typedef struct { mach_msg_header_t not_header; mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_NAME */ - mach_port_t not_port; + mach_port_name_t not_port; } mach_msg_accepted_notification_t; typedef struct { @@ -86,7 +86,7 @@ typedef struct { typedef struct { mach_msg_header_t not_header; mach_msg_type_t not_type; /* MACH_MSG_TYPE_PORT_NAME */ - mach_port_t not_port; + mach_port_name_t not_port; } mach_dead_name_notification_t; #endif /* _MACH_NOTIFY_H_ */ -- cgit v1.2.3