-#include <ipc/ipc_labelh.h>
-#endif /* MACH_KERNEL_PRIVATE */
-
-#ifdef XNU_KERNEL_PRIVATE
-
-/* defns for task->rsu_controldata */
-#define TASK_POLICY_CPU_RESOURCE_USAGE 0
-#define TASK_POLICY_WIREDMEM_RESOURCE_USAGE 1
-#define TASK_POLICY_VIRTUALMEM_RESOURCE_USAGE 2
-#define TASK_POLICY_DISK_RESOURCE_USAGE 3
-#define TASK_POLICY_NETWORK_RESOURCE_USAGE 4
-#define TASK_POLICY_POWER_RESOURCE_USAGE 5
-
-#define TASK_POLICY_RESOURCE_USAGE_COUNT 6
-
-/*
- * Process Action and Policy bit definitions
-
-The bit defns of the policy states
-64 60 56 52 48 44 40 36 32 28 24 20 16 12 8 0
-|----|-----|----|----|----|----|----|----|----|----|----|----|----|----|--------|
-|RFU | RFU | PWR| NET| DSK| CPU| VM | WM | LVM| RFU| CPU| NET| GPU| DSK| BGRND |
-|----|-----|----|----|----|----|----|----|----|----|----|----|----|----|--------|
-|<----------- RESOURCE USAGE -------->|< LOWSRC>|<-HARDWARE ACCESS->|BackGrnd|
-|----|-----|----|----|----|----|----|----|----|----|----|----|----|----|--------|
-
-*
-*/
-
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_NONE 0x00
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_LOWPRI 0x01
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_DISKTHROTTLE 0x02
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_NETTHROTTLE 0x04
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_NOGPU 0x08
-#if CONFIG_EMBEDDED
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_ALL 0x0F
-#else /* CONFIG_EMBEDDED */
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_ALL 0x07
-#endif /* CONFIG_EMBEDDED */
-#define TASK_POLICY_BACKGROUND_ATTRIBUTE_DEFAULT TASK_POLICY_BACKGROUND_ATTRIBUTE_ALL
-
-/* Hardware disk access attributes, bit different as it should reflect IOPOL_XXX */
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_NONE 0x00
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_FULLACCESS 0x01
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_NORMAL 0x01
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_PASSIVE 0x02
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_THROTTLE 0x03
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_UTILITY 0x04
-#define TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_DEFAULT TASK_POLICY_HWACCESS_DISK_ATTRIBUTE_FULLACCESS
-
-/* Hardware GPU access attributes */
-#define TASK_POLICY_HWACCESS_GPU_ATTRIBUTE_NONE 0x00
-#define TASK_POLICY_HWACCESS_GPU_ATTRIBUTE_FULLACCESS 0x00
-#define TASK_POLICY_HWACCESS_GPU_ATTRIBUTE_NOACCESS 0x01
-#define TASK_POLICY_HWACCESS_GPU_ATTRIBUTE_DEFAULT TASK_POLICY_HWACCESS_GPU_ATTRIBUTE_FULLACCESS
-
-/* Hardware Network access attributes */
-#define TASK_POLICY_HWACCESS_NET_ATTRIBUTE_NONE 0x00
-#define TASK_POLICY_HWACCESS_NET_ATTRIBUTE_FULLACCESS 0x00
-#define TASK_POLICY_HWACCESS_NET_ATTRIBUTE_THROTTLE 0x01
-#define TASK_POLICY_HWACCESS_NET_ATTRIBUTE_DEFAULT TASK_POLICY_HWACCESS_NET_ATTRIBUTE_FULLACCESS
-
-/* Hardware CPU access attributes */
-#define TASK_POLICY_HWACCESS_CPU_ATTRIBUTE_NONE 0x00
-#define TASK_POLICY_HWACCESS_CPU_ATTRIBUTE_FULLACCESS 0x00
-#define TASK_POLICY_HWACCESS_CPU_ATTRIBUTE_ONE 0x01
-#define TASK_POLICY_HWACCESS_CPU_ATTRIBUTE_LLCACHE 0x02
-#define TASK_POLICY_HWACCESS_CPU_ATTRIBUTE_DEFAULT TASK_POLICY_HWACCESS_CPU_ATTRIBUTE_FULLACCESS
-
-/* Resource usage/low resource attributes */
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_NONE 0x00
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_THROTTLE 0x01
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_SUSPEND 0x02
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_TERMINATE 0x03
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_NOTIFY_KQ 0x04
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_NOTIFY_EXC 0x05
-#define TASK_POLICY_RESOURCE_ATTRIBUTE_DEFAULT TASK_POLICY_RESOURCE_ATTRIBUTE_NONE
-
-#endif /* XNU_KERNEL_PRIVATE */
-
-#ifdef MACH_KERNEL_PRIVATE
-
-typedef struct process_policy {
- uint64_t apptype:4,
- rfu1:4,
- ru_power:4, /* Resource Usage Power */
- ru_net:4, /* Resource Usage Network */
- ru_disk:4, /* Resource Usage Disk */
- ru_cpu:4, /* Resource Usage CPU */
- ru_virtmem:4, /* Resource Usage VM */
- ru_wiredmem:4,/* Resource Usage Wired Memory */
- low_vm:4, /* Low Virtual Memory */
- rfu2:4,
- hw_cpu:4, /* HW Access to CPU */
- hw_net:4, /* HW Access to Network */
- hw_gpu:4, /* HW Access to GPU */
- hw_disk:4, /* HW Access to Disk */
- hw_bg:8; /* Darwin Background Policy */
-} process_policy_t;
-
-#if CONFIG_EMBEDDED
-
-typedef struct task_watcher {
- queue_chain_t tw_links; /* queueing of threads */
- task_t tw_task; /* task that is being watched */
- thread_t tw_thread; /* thread that is watching the watch_task */
- int tw_state; /* the current app state of the thread */
- int tw_importance; /* importance prior to backgrounding */
-} task_watch_t;
-
-extern lck_mtx_t task_watch_mtx;
-
-#endif /* CONFIG_EMBEDDED */