diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/bootstrap.c | 2 | ||||
-rw-r--r-- | kern/host.c | 2 | ||||
-rw-r--r-- | kern/ipc_host.c | 2 | ||||
-rw-r--r-- | kern/ipc_mig.c | 2 | ||||
-rw-r--r-- | kern/ipc_tt.c | 5 | ||||
-rw-r--r-- | kern/mach4.h | 66 | ||||
-rw-r--r-- | kern/mach_debug.h | 113 | ||||
-rw-r--r-- | kern/mach_host.h | 86 | ||||
-rw-r--r-- | kern/machine.c | 2 | ||||
-rw-r--r-- | kern/pc_sample.c | 8 | ||||
-rw-r--r-- | kern/slab.c | 1 | ||||
-rw-r--r-- | kern/syscall_emulation.c | 1 | ||||
-rw-r--r-- | kern/syscall_sw.c | 2 | ||||
-rw-r--r-- | kern/task.c | 3 | ||||
-rw-r--r-- | kern/thread.c | 6 |
15 files changed, 21 insertions, 280 deletions
diff --git a/kern/bootstrap.c b/kern/bootstrap.c index fdc75757..91f4241e 100644 --- a/kern/bootstrap.c +++ b/kern/bootstrap.c @@ -39,7 +39,7 @@ #include <machine/vm_param.h> #include <machine/pcb.h> #include <ipc/ipc_port.h> -#include <ipc/mach_port.h> +#include <ipc/mach_port.server.h> #include <kern/bootstrap.h> #include <kern/debug.h> #include <kern/host.h> diff --git a/kern/host.c b/kern/host.c index 4490a8e1..7ce8edff 100644 --- a/kern/host.c +++ b/kern/host.c @@ -42,7 +42,7 @@ #include <kern/processor.h> #include <kern/ipc_host.h> #include <kern/mach_clock.h> -#include <kern/mach_host.h> +#include <kern/mach_host.server.h> #include <mach/vm_param.h> host_data_t realhost; diff --git a/kern/ipc_host.c b/kern/ipc_host.c index 0f35689a..6b818623 100644 --- a/kern/ipc_host.c +++ b/kern/ipc_host.c @@ -35,7 +35,7 @@ #include <mach/message.h> #include <kern/debug.h> #include <kern/host.h> -#include <kern/mach_host.h> +#include <kern/mach_host.server.h> #include <kern/processor.h> #include <kern/task.h> #include <kern/thread.h> diff --git a/kern/ipc_mig.c b/kern/ipc_mig.c index a1757da3..ec121cf4 100644 --- a/kern/ipc_mig.c +++ b/kern/ipc_mig.c @@ -50,7 +50,7 @@ #include <ipc/ipc_port.h> #include <ipc/ipc_pset.h> #include <ipc/ipc_thread.h> -#include <ipc/mach_port.h> +#include <ipc/mach_port.server.h> #include <device/dev_hdr.h> #include <device/device_types.h> #include <device/ds_routines.h> diff --git a/kern/ipc_tt.c b/kern/ipc_tt.c index 63f6e77a..7c9a0b8d 100644 --- a/kern/ipc_tt.c +++ b/kern/ipc_tt.c @@ -42,6 +42,7 @@ #include <kern/thread.h> #include <kern/ipc_kobject.h> #include <kern/ipc_tt.h> +#include <kern/mach.server.h> #include <ipc/ipc_space.h> #include <ipc/ipc_table.h> #include <ipc/ipc_port.h> @@ -888,7 +889,7 @@ mach_ports_register( kern_return_t mach_ports_lookup( task_t task, - ipc_port_t **portsp, + mach_port_t **portsp, mach_msg_type_number_t *portsCnt) { vm_offset_t memory; @@ -925,7 +926,7 @@ mach_ports_lookup( itk_unlock(task); - *portsp = ports; + *portsp = (mach_port_t *)ports; *portsCnt = TASK_PORT_REGISTER_MAX; return KERN_SUCCESS; } diff --git a/kern/mach4.h b/kern/mach4.h deleted file mode 100644 index bff5d187..00000000 --- a/kern/mach4.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2023 Free Software Foundation, Inc. - * - * This file is part of GNU Mach. - * - * GNU Mach is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef _KERN_MACH4_H -#define _KERN_MACH4_H - -#include <kern/thread.h> - -/* RPCs */ - -kern_return_t -thread_enable_pc_sampling( - thread_t thread, - int *tickp, - sampled_pc_flavor_t flavors); - -kern_return_t -thread_disable_pc_sampling( - thread_t thread, - int *samplecntp); - -kern_return_t -task_enable_pc_sampling( - task_t task, - int *tickp, - sampled_pc_flavor_t flavors); - -kern_return_t -task_disable_pc_sampling( - task_t task, - int *samplecntp); - -kern_return_t -thread_get_sampled_pcs( - thread_t thread, - sampled_pc_seqno_t *seqnop, - sampled_pc_array_t sampled_pcs_out, - int *sampled_pcs_cntp); - -kern_return_t -task_get_sampled_pcs( - task_t task, - sampled_pc_seqno_t *seqnop, - sampled_pc_array_t sampled_pcs_out, - int *sampled_pcs_cntp); - -/* End of RPCs */ - -#endif /* _KERN_MACH4_H */ diff --git a/kern/mach_debug.h b/kern/mach_debug.h deleted file mode 100644 index 3d49b321..00000000 --- a/kern/mach_debug.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (C) 2023 Free Software Foundation, Inc. - * - * This file is part of GNU Mach. - * - * GNU Mach is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef _KERN_MACH_DEBUG_H -#define _KERN_MACH_DEBUG_H - -#include <mach/mach_types.h> /* task_t, pointer_t */ -#include <kern/task.h> - -/* RPCs */ - -#if defined(MACH_KDB) && defined(MACH_DEBUG) -kern_return_t host_load_symbol_table( - host_t host, - task_t task, - char *name, - pointer_t symtab, - unsigned int symbtab_count); -#endif /* defined(MACH_KDB) && defined(MACH_DEBUG) */ - -kern_return_t -mach_port_get_srights( - ipc_space_t space, - mach_port_name_t name, - mach_port_rights_t *srightsp); - -kern_return_t -mach_port_dnrequest_info( - ipc_space_t space, - mach_port_name_t name, - unsigned int *totalp, - unsigned int *usedp); - -kern_return_t -mach_port_kernel_object( - ipc_space_t space, - mach_port_name_t name, - unsigned int *typep, - vm_offset_t *addrp); - -kern_return_t -host_ipc_marequest_info( - host_t host, - unsigned int *maxp, - hash_info_bucket_array_t *infop, - unsigned int *countp); - -#if MACH_DEBUG -kern_return_t host_slab_info(host_t host, cache_info_array_t *infop, - unsigned int *infoCntp); -#endif /* MACH_DEBUG */ - -kern_return_t processor_set_stack_usage( - processor_set_t pset, - unsigned int *totalp, - vm_size_t *spacep, - vm_size_t *residentp, - vm_size_t *maxusagep, - vm_offset_t *maxstackp); - -kern_return_t host_stack_usage( - host_t host, - vm_size_t *reservedp, - unsigned int *totalp, - vm_size_t *spacep, - vm_size_t *residentp, - vm_size_t *maxusagep, - vm_offset_t *maxstackp); - -kern_return_t -mach_vm_region_info( - vm_map_t map, - vm_offset_t address, - vm_region_info_t *regionp, - ipc_port_t *portp); - -kern_return_t -mach_vm_object_info( - vm_object_t object, - vm_object_info_t *infop, - ipc_port_t *shadowp, - ipc_port_t *copyp); - -kern_return_t -mach_vm_object_pages( - vm_object_t object, - vm_page_info_array_t *pagesp, - natural_t *countp); - -kern_return_t -host_virtual_physical_table_info(const host_t host, - hash_info_bucket_array_t *infop, natural_t *countp); - -/* End of RPCs */ - -#endif /* _KERN_MACH_DEBUG_H */ diff --git a/kern/mach_host.h b/kern/mach_host.h deleted file mode 100644 index de644494..00000000 --- a/kern/mach_host.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2023 Free Software Foundation, Inc. - * - * This file is part of GNU Mach. - * - * GNU Mach is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef _KERN_MACH_HOST_H -#define _KERN_MACH_HOST_H - -#include <kern/processor.h> -#include <kern/host.h> -#include <mach/host_info.h> - -/* RPCs */ - -kern_return_t host_processors( - const host_t host, - processor_array_t *processor_list, - natural_t *countp); - -kern_return_t host_info( - const host_t host, - int flavor, - host_info_t info, - natural_t *count); - -kern_return_t host_kernel_version( - const host_t host, - kernel_version_t out_version); - -kern_return_t -host_processor_sets( - const host_t host, - processor_set_name_array_t *pset_list, - natural_t *count); - -kern_return_t -host_processor_set_priv( - const host_t host, - processor_set_t pset_name, - processor_set_t *pset); - -kern_return_t -processor_set_default( - const host_t host, - processor_set_t *pset); - -kern_return_t -host_reboot(const host_t host, int options); - -kern_return_t -host_get_boot_info( - host_t priv_host, - kernel_boot_info_t boot_info); - -kern_return_t task_get_assignment( - task_t task, - processor_set_t *pset); - -kern_return_t -thread_wire( - host_t host, - thread_t thread, - boolean_t wired); - -kern_return_t thread_get_assignment( - thread_t thread, - processor_set_t *pset); - -/* End of RPCs */ - -#endif /* _KERN_MACH_HOST_H */ diff --git a/kern/machine.c b/kern/machine.c index cf8060d7..8da6ad66 100644 --- a/kern/machine.c +++ b/kern/machine.c @@ -45,7 +45,7 @@ #include <kern/ipc_host.h> #include <kern/host.h> #include <kern/machine.h> -#include <kern/mach_host.h> +#include <kern/mach_host.server.h> #include <kern/lock.h> #include <kern/processor.h> #include <kern/queue.h> diff --git a/kern/pc_sample.c b/kern/pc_sample.c index d13beb07..9ac18821 100644 --- a/kern/pc_sample.c +++ b/kern/pc_sample.c @@ -35,7 +35,7 @@ #include <kern/host.h> #include <kern/thread.h> #include <kern/pc_sample.h> -#include <kern/mach4.h> +#include <kern/mach4.server.h> #include <kern/mach_clock.h> #if MACH_PCSAMPLE @@ -159,7 +159,7 @@ get_sampled_pcs( sample_control_t *cp, sampled_pc_seqno_t *seqnop, sampled_pc_array_t sampled_pcs_out, - int *sampled_pcs_cntp) + mach_msg_type_number_t *sampled_pcs_cntp) { int nsamples; sampled_pc_seqno_t seqidx1, seqidx2; @@ -218,7 +218,7 @@ thread_get_sampled_pcs( thread_t thread, sampled_pc_seqno_t *seqnop, sampled_pc_array_t sampled_pcs_out, - int *sampled_pcs_cntp) + mach_msg_type_number_t *sampled_pcs_cntp) { if (thread == THREAD_NULL) return KERN_INVALID_ARGUMENT; @@ -235,7 +235,7 @@ task_get_sampled_pcs( task_t task, sampled_pc_seqno_t *seqnop, sampled_pc_array_t sampled_pcs_out, - int *sampled_pcs_cntp) + mach_msg_type_number_t *sampled_pcs_cntp) { if (task == TASK_NULL) return KERN_INVALID_ARGUMENT; diff --git a/kern/slab.c b/kern/slab.c index d44da165..e26567fb 100644 --- a/kern/slab.c +++ b/kern/slab.c @@ -79,6 +79,7 @@ #include <kern/slab.h> #include <kern/kalloc.h> #include <kern/cpu_number.h> +#include <kern/mach_debug.server.h> #include <mach/vm_param.h> #include <mach/machine/vm_types.h> #include <vm/vm_kern.h> diff --git a/kern/syscall_emulation.c b/kern/syscall_emulation.c index 5a477006..50db1949 100644 --- a/kern/syscall_emulation.c +++ b/kern/syscall_emulation.c @@ -31,6 +31,7 @@ #include <kern/syscall_emulation.h> #include <kern/task.h> #include <kern/kalloc.h> +#include <kern/mach.server.h> #include <vm/vm_kern.h> /* XXX */ diff --git a/kern/syscall_sw.c b/kern/syscall_sw.c index f2163132..4249b711 100644 --- a/kern/syscall_sw.c +++ b/kern/syscall_sw.c @@ -38,7 +38,7 @@ #include <kern/syscall_subr.h> #include <kern/ipc_mig.h> #include <kern/eventcount.h> -#include <ipc/mach_port.h> +#include <ipc/mach_port.server.h> /* diff --git a/kern/task.c b/kern/task.c index d5bd14c2..6bd50983 100644 --- a/kern/task.c +++ b/kern/task.c @@ -44,7 +44,10 @@ #include <kern/task.h> #include <kern/thread.h> #include <kern/slab.h> +#include <kern/gnumach.server.h> #include <kern/kalloc.h> +#include <kern/mach.server.h> +#include <kern/mach_host.server.h> #include <kern/processor.h> #include <kern/printf.h> #include <kern/sched_prim.h> /* for thread_wakeup */ diff --git a/kern/thread.c b/kern/thread.c index db290f7e..bc155b45 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -45,8 +45,8 @@ #include <kern/eventcount.h> #include <kern/ipc_mig.h> #include <kern/ipc_tt.h> -#include <kern/mach_debug.h> -#include <kern/mach_host.h> +#include <kern/mach_debug.server.h> +#include <kern/mach_host.server.h> #include <kern/processor.h> #include <kern/queue.h> #include <kern/sched.h> @@ -63,7 +63,7 @@ #include <ipc/ipc_kmsg.h> #include <ipc/ipc_port.h> #include <ipc/mach_msg.h> -#include <ipc/mach_port.h> +#include <ipc/mach_port.server.h> #include <machine/machspl.h> /* for splsched */ #include <machine/pcb.h> #include <machine/thread.h> /* for MACHINE_STACK */ |