From 804ceef34074c661ce6e44cf4a44d88a501a633e Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Tue, 31 Jan 2023 01:08:09 -0500 Subject: Define rpc_vm_size_array_t and rpc_vm_offset_array_t When generating stubs, Mig will will take the vm_size_array_t and define the input request struct using rpc_vm_size_t since the size is variable. This will turn cause a mismatch between types (vm_size_t* vs rpc_vm_size_t*). We could also ask Mig to produce a prototype by using rpc_vm_size_t*, however we would need to change the implementation of the RPC to use rpc_* types anyway since we want to avoid another allocation of the array. Message-Id: --- vm/vm_map.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'vm/vm_map.c') diff --git a/vm/vm_map.c b/vm/vm_map.c index bea84a4d..23c4c296 100644 --- a/vm/vm_map.c +++ b/vm/vm_map.c @@ -4804,7 +4804,8 @@ vm_region_create_proxy (task_t task, vm_address_t address, kern_return_t ret; vm_map_entry_t entry, tmp_entry; vm_object_t object; - vm_offset_t offset, start; + rpc_vm_offset_t rpc_offset, rpc_start; + rpc_vm_size_t rpc_len = (rpc_vm_size_t) len; ipc_port_t pager; if (task == TASK_NULL) @@ -4840,16 +4841,16 @@ vm_region_create_proxy (task_t task, vm_address_t address, pager = ipc_port_copy_send(object->pager); vm_object_unlock(object); - start = (address - entry->vme_start) + entry->offset; - offset = 0; + rpc_start = (address - entry->vme_start) + entry->offset; + rpc_offset = 0; vm_map_unlock_read(task->map); ret = memory_object_create_proxy(task->itk_space, max_protection, &pager, 1, - &offset, 1, - &start, 1, - &len, 1, port); + &rpc_offset, 1, + &rpc_start, 1, + &rpc_len, 1, port); if (ret) ipc_port_release_send(pager); -- cgit v1.2.3