add mach_port_deallocate - frees the port from mach_make_memory_entry()

This commit is contained in:
Beau McCartney
2024-10-07 15:48:24 -06:00
parent 7b1086b489
commit db8950922c

View File

@@ -17,6 +17,7 @@ thread_act_t :: distinct u64
mach_port_t :: distinct c.uint
vm_map_t :: mach_port_t
mem_entry_name_port_t :: mach_port_t
ipc_space_t :: mach_port_t
vm_size_t :: distinct c.uintptr_t
@@ -29,6 +30,8 @@ vm_prot_t :: distinct c.int
vm_inherit_t :: distinct c.uint
mach_port_name_t :: distinct c.uint
@(default_calling_convention="c")
foreign mach {
mach_task_self :: proc() -> task_t ---
@@ -69,6 +72,11 @@ foreign mach {
parent_entry : mem_entry_name_port_t,
) -> kern_return_t ---
mach_port_deallocate :: proc (
task: ipc_space_t,
name: mach_port_name_t,
) -> kern_return_t ---
vm_page_size : vm_size_t
}