1 /*
2  * Copyright (c) 2000-2007, 2015 Apple Inc. All rights reserved.
3  *
4  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5  *
6  * This file contains Original Code and/or Modifications of Original Code
7  * as defined in and that are subject to the Apple Public Source License
8  * Version 2.0 (the 'License'). You may not use this file except in
9  * compliance with the License. The rights granted to you under the License
10  * may not be used to create, or enable the creation or redistribution of,
11  * unlawful or unlicensed copies of an Apple operating system, or to
12  * circumvent, violate, or enable the circumvention or violation of, any
13  * terms of an Apple operating system software license agreement.
14  *
15  * Please obtain a copy of the License at
16  * http://www.opensource.apple.com/apsl/ and read it before using this file.
17  *
18  * The Original Code and all software distributed under the License are
19  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23  * Please see the License for the specific language governing rights and
24  * limitations under the License.
25  *
26  * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27  */
28 /*
29  * @OSF_COPYRIGHT@
30  */
31 /*
32  * Mach Operating System
33  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
34  * All Rights Reserved.
35  *
36  * Permission to use, copy, modify and distribute this software and its
37  * documentation is hereby granted, provided that both the copyright
38  * notice and this permission notice appear in all copies of the
39  * software, derivative works or modified versions, and any portions
40  * thereof, and that both notices appear in supporting documentation.
41  *
42  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
43  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
44  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
45  *
46  * Carnegie Mellon requests users of this software to return to
47  *
48  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
49  *  School of Computer Science
50  *  Carnegie Mellon University
51  *  Pittsburgh PA 15213-3890
52  *
53  * any improvements or extensions that they make and grant Carnegie Mellon
54  * the rights to redistribute these changes.
55  */
56 /*
57  *	Machine-independent task information structures and definitions.
58  *
59  *	The definitions in this file are exported to the user.  The kernel
60  *	will translate its internal data structures to these structures
61  *	as appropriate.
62  *
63  */
64 
65 #ifndef _MACH_TASK_INFO_H_
66 #define _MACH_TASK_INFO_H_
67 
68 #include <mach/message.h>
69 #include <mach/machine/vm_types.h>
70 #include <mach/time_value.h>
71 #include <mach/policy.h>
72 #include <mach/vm_statistics.h> /* for vm_extmod_statistics_data_t */
73 #include <Availability.h>
74 
75 #include <sys/cdefs.h>
76 
77 /*
78  *	Generic information structure to allow for expansion.
79  */
80 typedef natural_t       task_flavor_t;
81 typedef integer_t       *task_info_t;           /* varying array of int */
82 
83 /* Deprecated, use per structure _data_t's instead */
84 #define TASK_INFO_MAX   (1024)          /* maximum array size */
85 typedef integer_t       task_info_data_t[TASK_INFO_MAX];
86 
87 /*
88  *	Currently defined information structures.
89  */
90 
91 #pragma pack(push, 4)
92 
93 /* Don't use this, use MACH_TASK_BASIC_INFO instead */
94 #define TASK_BASIC_INFO_32      4       /* basic information */
95 #define TASK_BASIC2_INFO_32      6
96 
97 struct task_basic_info_32 {
98 	integer_t       suspend_count;  /* suspend count for task */
99 	natural_t       virtual_size;   /* virtual memory size (bytes) */
100 	natural_t       resident_size;  /* resident memory size (bytes) */
101 	time_value_t    user_time;      /* total user run time for
102 	                                 *  terminated threads */
103 	time_value_t    system_time;    /* total system run time for
104 	                                 *  terminated threads */
105 	policy_t        policy;         /* default policy for new threads */
106 };
107 typedef struct task_basic_info_32       task_basic_info_32_data_t;
108 typedef struct task_basic_info_32       *task_basic_info_32_t;
109 #define TASK_BASIC_INFO_32_COUNT   \
110 	        (sizeof(task_basic_info_32_data_t) / sizeof(natural_t))
111 
112 /* Don't use this, use MACH_TASK_BASIC_INFO instead */
113 struct task_basic_info_64 {
114 	integer_t       suspend_count;  /* suspend count for task */
115 #if defined(__arm__) || defined(__arm64__)
116 	mach_vm_size_t  virtual_size;   /* virtual memory size (bytes) */
117 	mach_vm_size_t  resident_size;  /* resident memory size (bytes) */
118 #else /* defined(__arm__) || defined(__arm64__) */
119 	mach_vm_size_t  virtual_size;   /* virtual memory size (bytes) */
120 	mach_vm_size_t  resident_size;  /* resident memory size (bytes) */
121 #endif /* defined(__arm__) || defined(__arm64__) */
122 	time_value_t    user_time;      /* total user run time for
123 	                                 *  terminated threads */
124 	time_value_t    system_time;    /* total system run time for
125 	                                 *  terminated threads */
126 	policy_t        policy;         /* default policy for new threads */
127 };
128 typedef struct task_basic_info_64       task_basic_info_64_data_t;
129 typedef struct task_basic_info_64       *task_basic_info_64_t;
130 
131 #if defined(__arm__) || defined(__arm64__)
132 	#if   defined(__arm__) && defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0)
133 /*
134  * Note: arm64 can't use the old flavor.  If you somehow manage to,
135  * you can cope with the nonsense data yourself.
136  */
137 	#define TASK_BASIC_INFO_64      5
138 	#define TASK_BASIC_INFO_64_COUNT   \
139 	        (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
140 
141 	#else
142 
143 	#define TASK_BASIC_INFO_64              TASK_BASIC_INFO_64_2
144 	#define TASK_BASIC_INFO_64_COUNT        TASK_BASIC_INFO_64_2_COUNT
145 	#endif
146 #else /* defined(__arm__) || defined(__arm64__) */
147 #define TASK_BASIC_INFO_64      5       /* 64-bit capable basic info */
148 #define TASK_BASIC_INFO_64_COUNT   \
149 	        (sizeof(task_basic_info_64_data_t) / sizeof(natural_t))
150 #endif
151 
152 
153 /* localized structure - cannot be safely passed between tasks of differing sizes */
154 /* Don't use this, use MACH_TASK_BASIC_INFO instead */
155 struct task_basic_info {
156 	integer_t       suspend_count;  /* suspend count for task */
157 	vm_size_t       virtual_size;   /* virtual memory size (bytes) */
158 	vm_size_t       resident_size;  /* resident memory size (bytes) */
159 	time_value_t    user_time;      /* total user run time for
160 	                                 *  terminated threads */
161 	time_value_t    system_time;    /* total system run time for
162 	                                 *  terminated threads */
163 	policy_t        policy;         /* default policy for new threads */
164 };
165 
166 typedef struct task_basic_info          task_basic_info_data_t;
167 typedef struct task_basic_info          *task_basic_info_t;
168 #define TASK_BASIC_INFO_COUNT   \
169 	        (sizeof(task_basic_info_data_t) / sizeof(natural_t))
170 #if !defined(__LP64__)
171 #define TASK_BASIC_INFO TASK_BASIC_INFO_32
172 #else
173 #define TASK_BASIC_INFO TASK_BASIC_INFO_64
174 #endif
175 
176 
177 
178 #define TASK_EVENTS_INFO        2       /* various event counts */
179 
180 struct task_events_info {
181 	integer_t       faults;         /* number of page faults */
182 	integer_t       pageins;        /* number of actual pageins */
183 	integer_t       cow_faults;     /* number of copy-on-write faults */
184 	integer_t       messages_sent;  /* number of messages sent */
185 	integer_t       messages_received; /* number of messages received */
186 	integer_t       syscalls_mach;  /* number of mach system calls */
187 	integer_t       syscalls_unix;  /* number of unix system calls */
188 	integer_t       csw;            /* number of context switches */
189 };
190 typedef struct task_events_info         task_events_info_data_t;
191 typedef struct task_events_info         *task_events_info_t;
192 #define TASK_EVENTS_INFO_COUNT          ((mach_msg_type_number_t) \
193 	        (sizeof(task_events_info_data_t) / sizeof(natural_t)))
194 
195 #define TASK_THREAD_TIMES_INFO  3       /* total times for live threads -
196 	                                 *  only accurate if suspended */
197 
198 struct task_thread_times_info {
199 	time_value_t    user_time;      /* total user run time for
200 	                                 *  live threads */
201 	time_value_t    system_time;    /* total system run time for
202 	                                 *  live threads */
203 };
204 
205 typedef struct task_thread_times_info   task_thread_times_info_data_t;
206 typedef struct task_thread_times_info   *task_thread_times_info_t;
207 #define TASK_THREAD_TIMES_INFO_COUNT    ((mach_msg_type_number_t) \
208 	        (sizeof(task_thread_times_info_data_t) / sizeof(natural_t)))
209 
210 #define TASK_ABSOLUTETIME_INFO  1
211 
212 struct task_absolutetime_info {
213 	uint64_t                total_user;
214 	uint64_t                total_system;
215 	uint64_t                threads_user;   /* existing threads only */
216 	uint64_t                threads_system;
217 };
218 
219 typedef struct task_absolutetime_info   task_absolutetime_info_data_t;
220 typedef struct task_absolutetime_info   *task_absolutetime_info_t;
221 #define TASK_ABSOLUTETIME_INFO_COUNT    ((mach_msg_type_number_t) \
222 	        (sizeof (task_absolutetime_info_data_t) / sizeof (natural_t)))
223 
224 #define TASK_KERNELMEMORY_INFO  7
225 
226 struct task_kernelmemory_info {
227 	uint64_t                total_palloc;   /* private kernel mem alloc'ed */
228 	uint64_t                total_pfree;    /* private kernel mem freed */
229 	uint64_t                total_salloc;   /* shared kernel mem alloc'ed */
230 	uint64_t                total_sfree;    /* shared kernel mem freed */
231 };
232 
233 typedef struct task_kernelmemory_info   task_kernelmemory_info_data_t;
234 typedef struct task_kernelmemory_info   *task_kernelmemory_info_t;
235 #define TASK_KERNELMEMORY_INFO_COUNT    ((mach_msg_type_number_t) \
236 	        (sizeof (task_kernelmemory_info_data_t) / sizeof (natural_t)))
237 
238 #define TASK_SECURITY_TOKEN             13
239 #define TASK_SECURITY_TOKEN_COUNT       ((mach_msg_type_number_t) \
240 	        (sizeof(security_token_t) / sizeof(natural_t)))
241 
242 #define TASK_AUDIT_TOKEN                15
243 #define TASK_AUDIT_TOKEN_COUNT  \
244 	        (sizeof(audit_token_t) / sizeof(natural_t))
245 
246 
247 #define TASK_AFFINITY_TAG_INFO          16      /* This is experimental. */
248 
249 struct task_affinity_tag_info {
250 	integer_t               set_count;
251 	integer_t               min;
252 	integer_t               max;
253 	integer_t               task_count;
254 };
255 typedef struct task_affinity_tag_info   task_affinity_tag_info_data_t;
256 typedef struct task_affinity_tag_info   *task_affinity_tag_info_t;
257 #define TASK_AFFINITY_TAG_INFO_COUNT    \
258 	        (sizeof(task_affinity_tag_info_data_t) / sizeof(natural_t))
259 
260 #define TASK_DYLD_INFO                  17
261 
262 struct task_dyld_info {
263 	mach_vm_address_t       all_image_info_addr;
264 	mach_vm_size_t          all_image_info_size;
265 	integer_t               all_image_info_format;
266 };
267 typedef struct task_dyld_info   task_dyld_info_data_t;
268 typedef struct task_dyld_info   *task_dyld_info_t;
269 #define TASK_DYLD_INFO_COUNT    \
270 	        (sizeof(task_dyld_info_data_t) / sizeof(natural_t))
271 #define TASK_DYLD_ALL_IMAGE_INFO_32     0       /* format value */
272 #define TASK_DYLD_ALL_IMAGE_INFO_64     1       /* format value */
273 
274 #if defined(__arm__) || defined(__arm64__)
275 
276 /* Don't use this, use MACH_TASK_BASIC_INFO instead */
277 /* Compatibility for old 32-bit mach_vm_*_t */
278 #define TASK_BASIC_INFO_64_2     18       /* 64-bit capable basic info */
279 
280 struct task_basic_info_64_2 {
281 	integer_t       suspend_count;  /* suspend count for task */
282 	mach_vm_size_t  virtual_size;   /* virtual memory size (bytes) */
283 	mach_vm_size_t  resident_size;  /* resident memory size (bytes) */
284 	time_value_t    user_time;      /* total user run time for
285 	                                 *  terminated threads */
286 	time_value_t    system_time;    /* total system run time for
287 	                                 *  terminated threads */
288 	policy_t        policy;         /* default policy for new threads */
289 };
290 typedef struct task_basic_info_64_2       task_basic_info_64_2_data_t;
291 typedef struct task_basic_info_64_2       *task_basic_info_64_2_t;
292 #define TASK_BASIC_INFO_64_2_COUNT   \
293 	        (sizeof(task_basic_info_64_2_data_t) / sizeof(natural_t))
294 #endif
295 
296 #define TASK_EXTMOD_INFO                        19
297 
298 struct task_extmod_info {
299 	unsigned char   task_uuid[16];
300 	vm_extmod_statistics_data_t             extmod_statistics;
301 };
302 typedef struct task_extmod_info task_extmod_info_data_t;
303 typedef struct task_extmod_info *task_extmod_info_t;
304 #define TASK_EXTMOD_INFO_COUNT  \
305 	        (sizeof(task_extmod_info_data_t) / sizeof(natural_t))
306 
307 
308 #define MACH_TASK_BASIC_INFO     20         /* always 64-bit basic info */
309 struct mach_task_basic_info {
310 	mach_vm_size_t  virtual_size;       /* virtual memory size (bytes) */
311 	mach_vm_size_t  resident_size;      /* resident memory size (bytes) */
312 	mach_vm_size_t  resident_size_max;  /* maximum resident memory size (bytes) */
313 	time_value_t    user_time;          /* total user run time for
314 	                                     *  terminated threads */
315 	time_value_t    system_time;        /* total system run time for
316 	                                     *  terminated threads */
317 	policy_t        policy;             /* default policy for new threads */
318 	integer_t       suspend_count;      /* suspend count for task */
319 };
320 typedef struct mach_task_basic_info       mach_task_basic_info_data_t;
321 typedef struct mach_task_basic_info       *mach_task_basic_info_t;
322 #define MACH_TASK_BASIC_INFO_COUNT   \
323 	        (sizeof(mach_task_basic_info_data_t) / sizeof(natural_t))
324 
325 
326 #define TASK_POWER_INFO 21
327 
328 struct task_power_info {
329 	uint64_t                total_user;
330 	uint64_t                total_system;
331 	uint64_t                task_interrupt_wakeups;
332 	uint64_t                task_platform_idle_wakeups;
333 	uint64_t                task_timer_wakeups_bin_1;
334 	uint64_t                task_timer_wakeups_bin_2;
335 };
336 
337 typedef struct task_power_info  task_power_info_data_t;
338 typedef struct task_power_info  *task_power_info_t;
339 #define TASK_POWER_INFO_COUNT   ((mach_msg_type_number_t) \
340 	        (sizeof (task_power_info_data_t) / sizeof (natural_t)))
341 
342 
343 
344 #define TASK_VM_INFO            22
345 #define TASK_VM_INFO_PURGEABLE  23
346 struct task_vm_info {
347 	mach_vm_size_t  virtual_size;       /* virtual memory size (bytes) */
348 	integer_t       region_count;       /* number of memory regions */
349 	integer_t       page_size;
350 	mach_vm_size_t  resident_size;      /* resident memory size (bytes) */
351 	mach_vm_size_t  resident_size_peak; /* peak resident size (bytes) */
352 
353 	mach_vm_size_t  device;
354 	mach_vm_size_t  device_peak;
355 	mach_vm_size_t  internal;
356 	mach_vm_size_t  internal_peak;
357 	mach_vm_size_t  external;
358 	mach_vm_size_t  external_peak;
359 	mach_vm_size_t  reusable;
360 	mach_vm_size_t  reusable_peak;
361 	mach_vm_size_t  purgeable_volatile_pmap;
362 	mach_vm_size_t  purgeable_volatile_resident;
363 	mach_vm_size_t  purgeable_volatile_virtual;
364 	mach_vm_size_t  compressed;
365 	mach_vm_size_t  compressed_peak;
366 	mach_vm_size_t  compressed_lifetime;
367 
368 	/* added for rev1 */
369 	mach_vm_size_t  phys_footprint;
370 
371 	/* added for rev2 */
372 	mach_vm_address_t       min_address;
373 	mach_vm_address_t       max_address;
374 
375 	/* added for rev3 */
376 	int64_t ledger_phys_footprint_peak;
377 	int64_t ledger_purgeable_nonvolatile;
378 	int64_t ledger_purgeable_novolatile_compressed;
379 	int64_t ledger_purgeable_volatile;
380 	int64_t ledger_purgeable_volatile_compressed;
381 	int64_t ledger_tag_network_nonvolatile;
382 	int64_t ledger_tag_network_nonvolatile_compressed;
383 	int64_t ledger_tag_network_volatile;
384 	int64_t ledger_tag_network_volatile_compressed;
385 	int64_t ledger_tag_media_footprint;
386 	int64_t ledger_tag_media_footprint_compressed;
387 	int64_t ledger_tag_media_nofootprint;
388 	int64_t ledger_tag_media_nofootprint_compressed;
389 	int64_t ledger_tag_graphics_footprint;
390 	int64_t ledger_tag_graphics_footprint_compressed;
391 	int64_t ledger_tag_graphics_nofootprint;
392 	int64_t ledger_tag_graphics_nofootprint_compressed;
393 	int64_t ledger_tag_neural_footprint;
394 	int64_t ledger_tag_neural_footprint_compressed;
395 	int64_t ledger_tag_neural_nofootprint;
396 	int64_t ledger_tag_neural_nofootprint_compressed;
397 
398 	/* added for rev4 */
399 	uint64_t limit_bytes_remaining;
400 
401 	/* added for rev5 */
402 	integer_t decompressions;
403 };
404 typedef struct task_vm_info     task_vm_info_data_t;
405 typedef struct task_vm_info     *task_vm_info_t;
406 #define TASK_VM_INFO_COUNT      ((mach_msg_type_number_t) \
407 	        (sizeof (task_vm_info_data_t) / sizeof (natural_t)))
408 #define TASK_VM_INFO_REV5_COUNT TASK_VM_INFO_COUNT
409 #define TASK_VM_INFO_REV4_COUNT /* doesn't include decompressions */ \
410 	((mach_msg_type_number_t) (TASK_VM_INFO_REV5_COUNT - 1))
411 #define TASK_VM_INFO_REV3_COUNT /* doesn't include limit bytes */ \
412 	((mach_msg_type_number_t) (TASK_VM_INFO_REV4_COUNT - 2))
413 #define TASK_VM_INFO_REV2_COUNT /* doesn't include extra ledgers info */ \
414 	((mach_msg_type_number_t) (TASK_VM_INFO_REV3_COUNT - 42))
415 #define TASK_VM_INFO_REV1_COUNT /* doesn't include min and max address */ \
416 	((mach_msg_type_number_t) (TASK_VM_INFO_REV2_COUNT - 4))
417 #define TASK_VM_INFO_REV0_COUNT /* doesn't include phys_footprint */ \
418 	((mach_msg_type_number_t) (TASK_VM_INFO_REV1_COUNT - 2))
419 
420 typedef struct vm_purgeable_info        task_purgable_info_t;
421 
422 
423 #define TASK_TRACE_MEMORY_INFO  24  /* no longer supported */
424 struct task_trace_memory_info {
425 	uint64_t  user_memory_address;  /* address of start of trace memory buffer */
426 	uint64_t  buffer_size;                  /* size of buffer in bytes */
427 	uint64_t  mailbox_array_size;   /* size of mailbox area in bytes */
428 };
429 typedef struct task_trace_memory_info task_trace_memory_info_data_t;
430 typedef struct task_trace_memory_info * task_trace_memory_info_t;
431 #define TASK_TRACE_MEMORY_INFO_COUNT  ((mach_msg_type_number_t) \
432 	        (sizeof(task_trace_memory_info_data_t) / sizeof(natural_t)))
433 
434 #define TASK_WAIT_STATE_INFO  25    /* deprecated. */
435 struct task_wait_state_info {
436 	uint64_t  total_wait_state_time;        /* Time that all threads past and present have been in a wait state */
437 	uint64_t  total_wait_sfi_state_time;    /* Time that threads have been in SFI wait (should be a subset of total wait state time */
438 	uint32_t  _reserved[4];
439 };
440 typedef struct task_wait_state_info task_wait_state_info_data_t;
441 typedef struct task_wait_state_info * task_wait_state_info_t;
442 #define TASK_WAIT_STATE_INFO_COUNT  ((mach_msg_type_number_t) \
443 	        (sizeof(task_wait_state_info_data_t) / sizeof(natural_t)))
444 
445 #define TASK_POWER_INFO_V2      26
446 
447 typedef struct {
448 	uint64_t                task_gpu_utilisation;
449 	uint64_t                task_gpu_stat_reserved0;
450 	uint64_t                task_gpu_stat_reserved1;
451 	uint64_t                task_gpu_stat_reserved2;
452 } gpu_energy_data;
453 
454 typedef gpu_energy_data *gpu_energy_data_t;
455 struct task_power_info_v2 {
456 	task_power_info_data_t  cpu_energy;
457 	gpu_energy_data gpu_energy;
458 #if defined(__arm__) || defined(__arm64__)
459 	uint64_t                task_energy;
460 #endif /* defined(__arm__) || defined(__arm64__) */
461 	uint64_t                task_ptime;
462 	uint64_t                task_pset_switches;
463 };
464 
465 typedef struct task_power_info_v2       task_power_info_v2_data_t;
466 typedef struct task_power_info_v2       *task_power_info_v2_t;
467 #define TASK_POWER_INFO_V2_COUNT_OLD    \
468 	        ((mach_msg_type_number_t) (sizeof (task_power_info_v2_data_t) - sizeof(uint64_t)*2) / sizeof (natural_t))
469 #define TASK_POWER_INFO_V2_COUNT        \
470 	        ((mach_msg_type_number_t) (sizeof (task_power_info_v2_data_t) / sizeof (natural_t)))
471 
472 #define TASK_VM_INFO_PURGEABLE_ACCOUNT 27 /* Used for xnu purgeable vm unit tests */
473 
474 
475 #define TASK_FLAGS_INFO  28                     /* return t_flags field */
476 struct task_flags_info {
477 	uint32_t        flags;                          /* task flags */
478 };
479 typedef struct task_flags_info task_flags_info_data_t;
480 typedef struct task_flags_info * task_flags_info_t;
481 #define TASK_FLAGS_INFO_COUNT  ((mach_msg_type_number_t) \
482 	        (sizeof(task_flags_info_data_t) / sizeof (natural_t)))
483 
484 #define TF_LP64         0x00000001 /* task has 64-bit addressing */
485 #define TF_64B_DATA     0x00000002 /* task has 64-bit data registers */
486 
487 #define TASK_DEBUG_INFO_INTERNAL    29 /* Used for kernel internal development tests. */
488 
489 
490 /*
491  * Type to control EXC_GUARD delivery options for a task
492  * via task_get/set_exc_guard_behavior interface(s).
493  */
494 typedef uint32_t task_exc_guard_behavior_t;
495 
496 /* EXC_GUARD optional delivery settings on a per-task basis */
497 #define TASK_EXC_GUARD_VM_DELIVER            0x01 /* Deliver virtual memory EXC_GUARD exceptions */
498 #define TASK_EXC_GUARD_VM_ONCE               0x02 /* Deliver them only once */
499 #define TASK_EXC_GUARD_VM_CORPSE             0x04 /* Deliver them via a forked corpse */
500 #define TASK_EXC_GUARD_VM_FATAL              0x08 /* Virtual Memory EXC_GUARD delivery is fatal */
501 #define TASK_EXC_GUARD_VM_ALL                0x0f
502 
503 #define TASK_EXC_GUARD_MP_DELIVER            0x10 /* Deliver mach port EXC_GUARD exceptions */
504 #define TASK_EXC_GUARD_MP_ONCE               0x20 /* Deliver them only once */
505 #define TASK_EXC_GUARD_MP_CORPSE             0x40 /* Deliver them via a forked corpse */
506 #define TASK_EXC_GUARD_MP_FATAL              0x80 /* mach port EXC_GUARD delivery is fatal */
507 #define TASK_EXC_GUARD_MP_ALL                0xf0
508 
509 #define TASK_EXC_GUARD_ALL                   0xff /* All optional deliver settings */
510 
511 
512 /*
513  * Obsolete interfaces.
514  */
515 
516 #define TASK_SCHED_TIMESHARE_INFO       10
517 #define TASK_SCHED_RR_INFO              11
518 #define TASK_SCHED_FIFO_INFO            12
519 
520 #define TASK_SCHED_INFO                 14
521 
522 #pragma pack(pop)
523 
524 #endif  /* _MACH_TASK_INFO_H_ */