+
+#if CONFIG_DTRACE
+ uint32_t t_dtrace_flags; /* DTrace thread states */
+#define TH_DTRACE_EXECSUCCESS 0x01
+ uint32_t t_dtrace_predcache;/* DTrace per thread predicate value hint */
+ int64_t t_dtrace_tracing; /* Thread time under dtrace_probe() */
+ int64_t t_dtrace_vtime;
+#endif
+
+ clock_sec_t t_page_creation_time;
+ uint32_t t_page_creation_count;
+
+#define T_CHUD_MARKED 0x01 /* this thread is marked by CHUD */
+#define T_IN_CHUD 0x02 /* this thread is already in a CHUD handler */
+#define THREAD_PMC_FLAG 0x04 /* Bit in "t_chud" signifying PMC interest */
+#define T_AST_CALLSTACK 0x08 /* Thread scheduled to dump a
+ * callstack on its next
+ * AST */
+#define T_AST_NAME 0x10 /* Thread scheduled to dump
+ * its name on its next
+ * AST */
+#define T_NAME_DONE 0x20 /* Thread has previously
+ * recorded its name */
+#define T_KPC_ALLOC 0x40 /* Thread needs a kpc_buf */
+
+ uint32_t t_chud; /* CHUD flags, used for Shark */
+ uint32_t chud_c_switch; /* last dispatch detection */
+
+ integer_t mutex_count; /* total count of locks held */
+
+#ifdef KPC
+ /* accumulated performance counters for this thread */
+ uint64_t *kpc_buf;
+#endif
+
+#ifdef KPERF
+ /* count of how many times a thread has been sampled since it was last scheduled */
+ uint64_t kperf_pet_cnt;
+#endif
+
+ uint64_t thread_id; /*system wide unique thread-id*/
+
+ /* Statistics accumulated per-thread and aggregated per-task */
+ uint32_t syscalls_unix;
+ uint32_t syscalls_mach;
+ ledger_t t_ledger;
+ ledger_t t_threadledger; /* per thread ledger */
+
+ /* policy is protected by the task lock */
+ struct task_requested_policy requested_policy;
+ struct task_effective_policy effective_policy;
+ struct task_pended_policy pended_policy;
+
+ int iotier_override; /* atomic operations to set, cleared on ret to user */
+
+
+ integer_t saved_importance; /* saved task-relative importance */
+
+ uint32_t thread_callout_interrupt_wakeups;
+ uint32_t thread_callout_platform_idle_wakeups;
+ uint32_t thread_timer_wakeups_bin_1;
+ uint32_t thread_timer_wakeups_bin_2;
+ uint16_t thread_tag;
+ uint16_t callout_woken_from_icontext:1,
+ callout_woken_from_platform_idle:1,
+ callout_woke_thread:1,
+ thread_bitfield_unused:13;
+ /* Kernel holds on this thread */
+ int16_t suspend_count;
+ /* User level suspensions */
+ int16_t user_stop_count;