[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Use mach_port_name_t in a few more places
From: |
Flavio Cruz |
Subject: |
[PATCH] Use mach_port_name_t in a few more places |
Date: |
Thu, 1 Dec 2022 00:42:57 -0500 |
A few places that I missed in 958686efa2175abe3f7044890c2c2370e29147f2.
---
ipc/mach_debug.c | 2 +-
ipc/mach_msg.c | 2 +-
ipc/mach_port.c | 6 +++---
ipc/port.h | 9 ++++-----
4 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/ipc/mach_debug.c b/ipc/mach_debug.c
index 1f3865bc..ecbfca47 100644
--- a/ipc/mach_debug.c
+++ b/ipc/mach_debug.c
@@ -69,7 +69,7 @@
kern_return_t
mach_port_get_srights(
ipc_space_t space,
- mach_port_t name,
+ mach_port_name_t name,
mach_port_rights_t *srightsp)
{
ipc_port_t port;
diff --git a/ipc/mach_msg.c b/ipc/mach_msg.c
index c4b1fed6..aa8cdb5b 100644
--- a/ipc/mach_msg.c
+++ b/ipc/mach_msg.c
@@ -290,7 +290,7 @@ mach_msg_receive_continue(void)
mach_msg_option_t option = self->ith_option;
mach_msg_size_t rcv_size = self->ith_rcv_size;
mach_msg_timeout_t time_out = self->ith_timeout;
- mach_port_t notify = self->ith_notify;
+ mach_port_name_t notify = self->ith_notify;
ipc_object_t object = self->ith_object;
ipc_mqueue_t mqueue = self->ith_mqueue;
ipc_kmsg_t kmsg;
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index dbd24ae7..db6e05dc 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -959,7 +959,7 @@ mach_port_get_set_status(
/* the port set must be active */
names = (mach_port_name_t *) addr;
- maxnames = size / sizeof(mach_port_t);
+ maxnames = size / sizeof(mach_port_name_t);
actual = 0;
ipc_entry_t ientry;
@@ -1045,7 +1045,7 @@ kern_return_t
mach_port_move_member(
ipc_space_t space,
mach_port_name_t member,
- mach_port_t after)
+ mach_port_name_t after)
{
ipc_entry_t entry;
ipc_port_t port;
@@ -1259,7 +1259,7 @@ mach_port_insert_right(
kern_return_t
mach_port_extract_right(
ipc_space_t space,
- mach_port_t name,
+ mach_port_name_t name,
mach_msg_type_name_t msgt_name,
ipc_port_t *poly,
mach_msg_type_name_t *polyPoly)
diff --git a/ipc/port.h b/ipc/port.h
index 49af6e2c..9ef586c1 100644
--- a/ipc/port.h
+++ b/ipc/port.h
@@ -42,10 +42,10 @@
#include <mach/port.h>
/*
- * mach_port_t must be an unsigned type. Port values
+ * mach_port_name_t must be an unsigned type. Port values
* have two parts, a generation number and an index.
* These macros encapsulate all knowledge of how
- * a mach_port_t is laid out.
+ * a mach_port_name_t is laid out.
*
* If the size of generation numbers changes,
* be sure to update IE_BITS_GEN_MASK and friends
@@ -67,11 +67,10 @@
/*
* Typedefs for code cleanliness. These must all have
- * the same (unsigned) type as mach_port_t.
+ * the same (unsigned) type as mach_port_name_t.
*/
-typedef mach_port_t mach_port_index_t; /* index values */
-typedef mach_port_t mach_port_gen_t; /* generation numbers */
+typedef mach_port_name_t mach_port_gen_t; /* generation numbers */
#define MACH_PORT_UREFS_MAX ((mach_port_urefs_t) ((1 << 16) - 1))
--
2.37.2
- [PATCH] Use mach_port_name_t in a few more places,
Flavio Cruz <=