[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/15] compute mach port size from the corresponding type
From: |
Luca Dariz |
Subject: |
[PATCH 04/15] compute mach port size from the corresponding type |
Date: |
Tue, 28 Jun 2022 12:10:43 +0200 |
* ipc/ipc_machdep.h: re-define PORT_T_SIZE_IN_BITS to be computed from
mach_port_t instead of being hardcoded.
Signed-off-by: Luca Dariz <luca@orpolo.org>
---
ipc/ipc_machdep.h | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/ipc/ipc_machdep.h b/ipc/ipc_machdep.h
index c205ba45..29878dc9 100755
--- a/ipc/ipc_machdep.h
+++ b/ipc/ipc_machdep.h
@@ -27,18 +27,12 @@
#ifndef _IPC_IPC_MACHDEP_H_
#define _IPC_IPC_MACHDEP_H_
+#include <mach/message.h>
+
/*
* At times, we need to know the size of a port in bits
*/
-/* 64 bit machines */
-#if defined(__alpha)
-#define PORT_T_SIZE_IN_BITS 64
-#endif
-
-/* default, 32 bit machines */
-#if !defined(PORT_T_SIZE_IN_BITS)
-#define PORT_T_SIZE_IN_BITS 32
-#endif
+#define PORT_T_SIZE_IN_BITS (sizeof(mach_port_t)*8)
#endif /* _IPC_IPC_MACHDEP_H_ */
--
2.30.2
- [PATCH 00/15] Add preliminary support for 32-bit userspace on a x86_64 kernel, Luca Dariz, 2022/06/28
- [PATCH 01/15] fix rpc types for KERNEL_USER stubs, Luca Dariz, 2022/06/28
- [PATCH 03/15] fix argument passing to bootstrap modules, Luca Dariz, 2022/06/28
- [PATCH 06/15] kmsg: fix msg body alignment, Luca Dariz, 2022/06/28
- [PATCH 09/15] x86_64: fix exception stack alignment, Luca Dariz, 2022/06/28
- [PATCH 04/15] compute mach port size from the corresponding type,
Luca Dariz <=
- [PATCH 05/15] sign-extend mask in vm_map() with 32-bit userspace, Luca Dariz, 2022/06/28
- [PATCH 08/15] use port name type in mach_port_names(), Luca Dariz, 2022/06/28
- [PATCH 10/15] x86_64: expand and shrink messages in copy{in, out}msg routines, Luca Dariz, 2022/06/28
- [PATCH 02/15] simplify ipc_kmsg_copyout_body() usage, Luca Dariz, 2022/06/28
- [PATCH 07/15] fix host_info structure definition, Luca Dariz, 2022/06/28
- [PATCH 11/15] update syscall signature with rpc_vm_* and mach_port_name_t, Luca Dariz, 2022/06/28
- [PATCH 15/15] enable syscalls on x86_64, Luca Dariz, 2022/06/28
- [PATCH 14/15] hack vm memory object proxy creation for vm arrays, Luca Dariz, 2022/06/28
- [PATCH 13/15] cleanup headers in printf.c, Luca Dariz, 2022/06/28
- [PATCH 12/15] fix warnings for 32 bit builds, Luca Dariz, 2022/06/28