]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/processor_set.defs
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / mach / processor_set.defs
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * @OSF_FREE_COPYRIGHT@
27 */
28 /*
29 * Mach Operating System
30 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
31 * All Rights Reserved.
32 *
33 * Permission to use, copy, modify and distribute this software and its
34 * documentation is hereby granted, provided that both the copyright
35 * notice and this permission notice appear in all copies of the
36 * software, derivative works or modified versions, and any portions
37 * thereof, and that both notices appear in supporting documentation.
38 *
39 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
40 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
41 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
42 *
43 * Carnegie Mellon requests users of this software to return to
44 *
45 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
46 * School of Computer Science
47 * Carnegie Mellon University
48 * Pittsburgh PA 15213-3890
49 *
50 * any improvements or extensions that they make and grant Carnegie Mellon
51 * the rights to redistribute these changes.
52 */
53 /*
54 */
55 /*
56 * File: mach/mach_port.defs
57 * Author: Rich Draves
58 *
59 * Exported kernel calls.
60 */
61
62 subsystem
63 #if KERNEL_SERVER
64 KernelServer
65 #endif KERNEL_SERVER
66 processor_set 4000;
67
68 #include <mach/std_types.defs>
69 #include <mach/mach_types.defs>
70
71 /*
72 * Return scheduling statistics for a processor set.
73 */
74 routine processor_set_statistics(
75 pset : processor_set_name_t;
76 flavor : processor_set_flavor_t;
77 out info_out : processor_set_info_t, CountInOut);
78
79
80 /*
81 * Destroy processor set.
82 */
83 routine processor_set_destroy(
84 set : processor_set_t);
85
86
87 /*
88 * Set max priority for processor_set.
89 */
90 routine processor_set_max_priority(
91 processor_set : processor_set_t;
92 max_priority : int;
93 change_threads : boolean_t);
94
95 /*
96 * Enable policy for processor set
97 */
98 routine processor_set_policy_enable(
99 processor_set : processor_set_t;
100 policy : int);
101
102 /*
103 * Disable policy for processor set
104 */
105 routine processor_set_policy_disable(
106 processor_set : processor_set_t;
107 policy : int;
108 change_threads : boolean_t);
109
110 /*
111 * List all tasks in processor set.
112 */
113 routine processor_set_tasks(
114 processor_set : processor_set_t;
115 out task_list : task_array_t);
116
117 /*
118 * List all threads in processor set.
119 */
120 routine processor_set_threads(
121 processor_set : processor_set_t;
122 out thread_list : thread_act_array_t);
123
124 /*
125 * Controls the scheduling attributes governing the processor set.
126 * Allows control of enabled policies, and per-policy base and limit
127 * priorities.
128 */
129 routine processor_set_policy_control(
130 pset : processor_set_t;
131 flavor : processor_set_flavor_t;
132 policy_info : processor_set_info_t;
133 change : boolean_t);
134
135
136 /*
137 * Debug Info
138 * This call is only valid on MACH_DEBUG kernels.
139 * Otherwise, KERN_FAILURE is returned.
140 */
141 routine processor_set_stack_usage(
142 pset : processor_set_t;
143 out total : unsigned;
144 out space : vm_size_t;
145 out resident : vm_size_t;
146 out maxusage : vm_size_t;
147 out maxstack : vm_offset_t);
148
149 /*
150 * Get information about processor set.
151 */
152 routine processor_set_info(
153 set_name : processor_set_name_t;
154 flavor : int;
155 out host : host_t;
156 out info_out : processor_set_info_t, CountInOut);
157