+extern void set_bsdtask_info(task_t, void *);
+extern uint32_t set_task_loadTag(task_t task, uint32_t loadTag);
+extern vm_map_t get_task_map_reference(task_t);
+extern vm_map_t swap_task_map(task_t, thread_t, vm_map_t);
+extern pmap_t get_task_pmap(task_t);
+extern uint64_t get_task_resident_size(task_t);
+extern uint64_t get_task_compressed(task_t);
+extern uint64_t get_task_resident_max(task_t);
+extern uint64_t get_task_phys_footprint(task_t);
+#if CONFIG_LEDGER_INTERVAL_MAX
+extern uint64_t get_task_phys_footprint_interval_max(task_t, int reset);
+#endif /* CONFIG_FOOTPRINT_INTERVAL_MAX */
+extern uint64_t get_task_phys_footprint_lifetime_max(task_t);
+extern uint64_t get_task_phys_footprint_limit(task_t);
+extern uint64_t get_task_purgeable_size(task_t);
+extern uint64_t get_task_cpu_time(task_t);
+extern uint64_t get_task_dispatchqueue_offset(task_t);
+extern uint64_t get_task_dispatchqueue_serialno_offset(task_t);
+extern uint64_t get_task_dispatchqueue_label_offset(task_t);
+extern uint64_t get_task_uniqueid(task_t task);
+extern int get_task_version(task_t task);
+
+extern uint64_t get_task_internal(task_t);
+extern uint64_t get_task_internal_compressed(task_t);
+extern uint64_t get_task_purgeable_nonvolatile(task_t);
+extern uint64_t get_task_purgeable_nonvolatile_compressed(task_t);
+extern uint64_t get_task_iokit_mapped(task_t);
+extern uint64_t get_task_alternate_accounting(task_t);
+extern uint64_t get_task_alternate_accounting_compressed(task_t);
+extern uint64_t get_task_memory_region_count(task_t);
+extern uint64_t get_task_page_table(task_t);
+extern uint64_t get_task_network_nonvolatile(task_t);
+extern uint64_t get_task_network_nonvolatile_compressed(task_t);
+extern uint64_t get_task_wired_mem(task_t);
+extern uint32_t get_task_loadTag(task_t task);
+
+extern kern_return_t task_convert_phys_footprint_limit(int, int *);
+extern kern_return_t task_set_phys_footprint_limit_internal(task_t, int, int *, boolean_t, boolean_t);
+extern kern_return_t task_get_phys_footprint_limit(task_t task, int *limit_mb);
+
+/* Jetsam memlimit attributes */
+extern boolean_t task_get_memlimit_is_active(task_t task);
+extern boolean_t task_get_memlimit_is_fatal(task_t task);
+extern void task_set_memlimit_is_active(task_t task, boolean_t memlimit_is_active);
+extern void task_set_memlimit_is_fatal(task_t task, boolean_t memlimit_is_fatal);
+extern boolean_t task_has_triggered_exc_resource(task_t task, boolean_t memlimit_is_active);
+extern void task_mark_has_triggered_exc_resource(task_t task, boolean_t memlimit_is_active);
+
+extern void task_set_thread_limit(task_t task, uint16_t thread_limit);
+
+
+extern boolean_t is_kerneltask(task_t task);
+extern boolean_t is_corpsetask(task_t task);
+
+extern kern_return_t check_actforsig(task_t task, thread_t thread, int setast);
+
+extern kern_return_t machine_task_get_state(
+ task_t task,
+ int flavor,
+ thread_state_t state,
+ mach_msg_type_number_t *state_count);
+
+extern kern_return_t machine_task_set_state(
+ task_t task,
+ int flavor,
+ thread_state_t state,
+ mach_msg_type_number_t state_count);
+
+extern void machine_task_terminate(task_t task);
+
+struct _task_ledger_indices {
+ int cpu_time;
+ int tkm_private;
+ int tkm_shared;
+ int phys_mem;
+ int wired_mem;
+ int internal;
+ int iokit_mapped;
+ int alternate_accounting;
+ int alternate_accounting_compressed;
+ int page_table;
+ int phys_footprint;
+ int internal_compressed;
+ int purgeable_volatile;
+ int purgeable_nonvolatile;
+ int purgeable_volatile_compressed;
+ int purgeable_nonvolatile_compressed;
+ int tagged_nofootprint;
+ int tagged_footprint;
+ int tagged_nofootprint_compressed;
+ int tagged_footprint_compressed;
+ int network_volatile;
+ int network_nonvolatile;
+ int network_volatile_compressed;
+ int network_nonvolatile_compressed;
+ int media_nofootprint;
+ int media_footprint;
+ int media_nofootprint_compressed;
+ int media_footprint_compressed;
+ int graphics_nofootprint;
+ int graphics_footprint;
+ int graphics_nofootprint_compressed;
+ int graphics_footprint_compressed;
+ int neural_nofootprint;
+ int neural_footprint;
+ int neural_nofootprint_compressed;
+ int neural_footprint_compressed;
+ int platform_idle_wakeups;
+ int interrupt_wakeups;
+#if CONFIG_SCHED_SFI
+ int sfi_wait_times[MAX_SFI_CLASS_ID];
+#endif /* CONFIG_SCHED_SFI */
+ int cpu_time_billed_to_me;
+ int cpu_time_billed_to_others;
+ int physical_writes;
+ int logical_writes;
+ int logical_writes_to_external;
+ int energy_billed_to_me;
+ int energy_billed_to_others;
+#if DEBUG || DEVELOPMENT
+ int pages_grabbed;
+ int pages_grabbed_kern;
+ int pages_grabbed_iopl;
+ int pages_grabbed_upl;
+#endif
+};
+extern struct _task_ledger_indices task_ledgers;
+
+/* requires task to be unlocked, returns a referenced thread */
+thread_t task_findtid(task_t task, uint64_t tid);
+int pid_from_task(task_t task);
+
+extern kern_return_t task_wakeups_monitor_ctl(task_t task, uint32_t *rate_hz, int32_t *flags);
+extern kern_return_t task_cpu_usage_monitor_ctl(task_t task, uint32_t *flags);
+extern void task_rollup_accounting_info(task_t new_task, task_t parent_task);
+extern kern_return_t task_io_monitor_ctl(task_t task, uint32_t *flags);
+extern void task_set_did_exec_flag(task_t task);
+extern void task_clear_exec_copy_flag(task_t task);
+extern boolean_t task_is_exec_copy(task_t);
+extern boolean_t task_did_exec(task_t task);
+#ifdef CONFIG_32BIT_TELEMETRY
+extern boolean_t task_consume_32bit_log_flag(task_t task);
+extern void task_set_32bit_log_flag(task_t task);
+#endif /* CONFIG_32BIT_TELEMETRY */
+extern boolean_t task_is_active(task_t task);
+extern boolean_t task_is_halting(task_t task);
+extern void task_clear_return_wait(task_t task, uint32_t flags);
+extern void task_wait_to_return(void) __attribute__((noreturn));
+extern event_t task_get_return_wait_event(task_t task);
+
+extern void task_atm_reset(task_t task);
+extern void task_bank_reset(task_t task);
+extern void task_bank_init(task_t task);
+
+#if CONFIG_ARCADE
+extern void task_prep_arcade(task_t task, thread_t thread);
+#endif /* CONFIG_ARCADE */
+
+extern int task_pid(task_t task);
+extern boolean_t task_has_assertions(task_t task);
+/* End task_policy */
+
+extern void task_set_gpu_denied(task_t task, boolean_t denied);
+extern boolean_t task_is_gpu_denied(task_t task);
+
+extern queue_head_t * task_io_user_clients(task_t task);
+extern void task_set_message_app_suspended(task_t task, boolean_t enable);
+
+extern void task_copy_fields_for_exec(task_t dst_task, task_t src_task);
+
+extern void task_copy_vmobjects(task_t task, vm_object_query_t query, int len, int64_t* num);
+
+#endif /* XNU_KERNEL_PRIVATE */
+
+#ifdef KERNEL_PRIVATE
+
+extern void *get_bsdtask_info(task_t);
+extern void *get_bsdthreadtask_info(thread_t);
+extern void task_bsdtask_kill(task_t);