+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;
+};
+extern struct _task_ledger_indices task_ledgers;
+
+int proc_get_task_bg_policy(task_t task);
+int proc_get_thread_bg_policy(task_t task, uint64_t tid);
+int proc_get_self_isbackground(void);
+int proc_get_selfthread_isbackground(void);
+
+int proc_get_darwinbgstate(task_t, uint32_t *);
+int proc_set_bgtaskpolicy(task_t task, int intval);
+int proc_set_and_apply_bgtaskpolicy(task_t task, int intval);
+int proc_set_bgthreadpolicy(task_t task, uint64_t tid, int val);
+int proc_set_and_apply_bgthreadpolicy(task_t task, uint64_t tid, int val);
+
+int proc_add_bgtaskpolicy(task_t task, int val);
+int proc_add_bgthreadpolicy(task_t task, uint64_t tid, int val);
+int proc_remove_bgtaskpolicy(task_t task, int policy);
+int proc_remove_bgthreadpolicy(task_t task, uint64_t tid, int val);
+
+int proc_apply_bgtaskpolicy(task_t task);
+int proc_apply_bgtaskpolicy_external(task_t task);
+int proc_apply_bgthreadpolicy(task_t task, uint64_t tid);
+int proc_apply_bgtask_selfpolicy(void);
+int proc_apply_bgthread_selfpolicy(void);
+int proc_apply_workq_bgthreadpolicy(thread_t);
+
+int proc_restore_bgtaskpolicy(task_t task);
+int proc_restore_bgthreadpolicy(task_t task, uint64_t tid);
+int proc_restore_bgthread_selfpolicy(void);
+int proc_restore_workq_bgthreadpolicy(thread_t);
+void proc_task_remove_throttle(task_t task);
+
+/* hw access routines */
+int proc_apply_task_diskacc(task_t task, int policy);
+int proc_apply_thread_diskacc(task_t task, uint64_t tid, int policy);
+int proc_apply_thread_selfdiskacc(int policy);
+int proc_get_task_disacc(task_t task);
+int proc_get_task_selfdiskacc(void);
+int proc_get_diskacc(thread_t thread);
+int proc_get_thread_selfdiskacc(void);
+int proc_denyinherit_policy(task_t task);
+int proc_denyselfset_policy(task_t task);
+
+int proc_get_task_selfgpuacc_deny(void);
+int proc_apply_task_gpuacc(task_t task, int prio);
+
+int proc_get_task_ruse_cpu(task_t task, uint32_t * policyp, uint32_t * percentagep, uint64_t * intervalp, uint64_t * deadlinep);
+int proc_set_task_ruse_cpu(task_t task, uint32_t policy, uint32_t percentage, uint64_t interval, uint64_t deadline);
+int proc_clear_task_ruse_cpu(task_t task);
+thread_t task_findtid(task_t, uint64_t);
+
+#define TASK_RUSECPU_FLAGS_PROC_LIMIT 0x1
+#define TASK_RUSECPU_FLAGS_PERTHR_LIMIT 0x2
+#define TASK_RUSECPU_FLAGS_DEADLINE 0x4
+
+#define PROC_POLICY_OSX_APPTYPE_NONE 0
+#if CONFIG_EMBEDDED
+#define PROC_POLICY_IOS_RESV1_APPTYPE 1
+#define PROC_POLICY_IOS_APPLE_DAEMON 2
+#define PROC_POLICY_IOS_APPTYPE 3
+#define PROC_POLICY_IOS_NONUITYPE 4
+#else
+#define PROC_POLICY_OSX_APPTYPE_TAL 1
+#define PROC_POLICY_OSX_APPTYPE_WIDGET 2
+#define PROC_POLICY_OSX_APPTYPE_DBCLIENT 2 /* Not a bug, just rename of widget */
+#endif
+
+void proc_set_task_apptype(task_t task, int type, thread_t thread);
+int proc_disable_task_apptype(task_t task, int policy_subtype);
+int proc_enable_task_apptype(task_t task, int policy_subtype);
+
+#if CONFIG_EMBEDDED
+extern int proc_setthread_saved_importance(thread_t thread, int importance);
+#endif
+
+/* BSD call back functions */
+extern int proc_apply_resource_actions(void * p, int type, int action);
+extern int proc_restore_resource_actions(void * p, int type, int action);
+extern int task_restore_resource_actions(task_t task, int type);
+
+extern void proc_apply_task_networkbg(void * bsd_info);
+extern void proc_restore_task_networkbg(void * bsd_info);
+extern void proc_set_task_networkbg(void * bsd_info, int setbg);
+extern int task_clear_cpuusage(task_t task);
+
+#if CONFIG_EMBEDDED
+#define TASK_APPSTATE_NONE 0
+#define TASK_APPSTATE_ACTIVE 1
+#define TASK_APPSTATE_BACKGROUND 2
+#define TASK_APPSTATE_NONUI 3
+#define TASK_APPSTATE_INACTIVE 4
+
+extern int proc_lf_getappstate(task_t task);
+extern int proc_lf_setappstate(task_t task, int state);
+extern int proc_lf_pidbind(task_t curtask, uint64_t tid, task_t target_task, int bind);
+extern void thead_remove_taskwatch(thread_t thread);
+extern void task_removewatchers(task_t task);
+#endif /* CONFIG_EMBEDDED */
+