From 3b1fcb2b83bb26d43dc912884499345f561d0b6a Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Thu, 14 Dec 2023 01:02:30 -0500 Subject: x86_64: adapt MiG generated stubs to use mach_port_name_inlined_t for inlined port rights. For i686, we just change the code to use mach_port_name_inlined_t when defining the types. This is a no-op. For x86_64, there's a few things that are different: - In the server code, the server handler can get inlined ports and the array will be resized and cast as an array of mach_port_name_t. Output parameters have a similar treatment where the inlined array in the output is used as an array of mach_port_name_t but resized to look like a mach_port_name_inlined_t. - In the user side, we follow the same approach. Input ports as arrays of mach_port_name_t are expanded into an array of mach_port_name_inlined_t. Output ports are then converted back into an array of mach_port_name_inlined_t so that they fit into the expected message format. Essentially, regardless of whether port rights are inline or out of line, user interfaces and server stubs always receive an array of port rights, not mach_port_name_inlined_t. However, inlined port rights will be exchanged using mach_port_name_inlined_t. --- cpu.sym | 1 + 1 file changed, 1 insertion(+) (limited to 'cpu.sym') diff --git a/cpu.sym b/cpu.sym index bee12f0..1ac2fae 100644 --- a/cpu.sym +++ b/cpu.sym @@ -105,6 +105,7 @@ expr sizeof(float) sizeof_float expr sizeof(double) sizeof_double expr sizeof(uintptr_t) sizeof_uintptr_t expr sizeof(intptr_t) sizeof_intptr_t +expr (sizeof(uintptr_t)*8) sizeof_uintptr_t_in_bits expr sizeof(mach_msg_header_t) sizeof_mach_msg_header_t expr sizeof(mach_msg_type_long_t) sizeof_mach_msg_type_long_t expr sizeof(mach_msg_type_t) sizeof_mach_msg_type_t -- cgit v1.2.3