|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /*
26: * Mach Operating System
27: * Copyright (c) 1991,1990,1989 Carnegie Mellon University
28: * All Rights Reserved.
29: *
30: * Permission to use, copy, modify and distribute this software and its
31: * documentation is hereby granted, provided that both the copyright
32: * notice and this permission notice appear in all copies of the
33: * software, derivative works or modified versions, and any portions
34: * thereof, and that both notices appear in supporting documentation.
35: *
36: * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
37: * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
38: * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
39: *
40: * Carnegie Mellon requests users of this software to return to
41: *
42: * Software Distribution Coordinator or [email protected]
43: * School of Computer Science
44: * Carnegie Mellon University
45: * Pittsburgh PA 15213-3890
46: *
47: * any improvements or extensions that they make and grant Carnegie Mellon
48: * the rights to redistribute these changes.
49: */
50: /*
51: * HISTORY
52: * $Log: mach_host.defs,v $
1.1.1.2 ! root 53: * Revision 1.4 1999/07/22 20:04:00 wsanchez
! 54: * Update APSL
! 55: *
! 56: * Revision 1.3 1999/03/25 09:19:41 wsanchez
! 57: * Merge kernel-copyrights.
! 58: * Undelete drvAdaptecU2SCSI.
! 59: *
1.1 root 60: * Revision 1.2.218.4 1999/03/16 17:05:39 wsanchez
61: * Substitute License
62: *
63: * Revision 1.2.218.3 1999/03/16 15:28:02 wsanchez
64: * Substitute copyright
65: *
66: * Revision 1.2.218.2 1999/03/16 10:37:38 umeshv
67: * Fixed errors in previous commit.
68: *
69: * Revision 1.2.218.1 1999/03/11 09:52:49 umeshv
70: * Added copyrights.
71: *
72: * Revision 1.2 1998/11/25 19:39:12 wsanchez
73: * Merged in PR-2288345 (mwatson: mach_host.defs id's offset by one)
74: *
75: * Revision 1.1.1.1.440.1 1998/11/24 19:30:54 mwatson
76: * Remove unused routine, now that -DNeXT is gone.
77: *
78: * Revision 1.1.1.1 1997/09/30 02:44:50 wsanchez
79: * Import of kernel from umeshv/kernel
80: *
81: * Revision 2.10 92/03/10 16:26:54 jsb
82: * From [email protected]: added host_get_boot_info.
83: * [92/01/08 15:01:12 jsb]
84: *
85: * Revision 2.9 92/02/19 16:07:19 elf
86: * Reenable thread_depress_abort.
87: * [92/01/20 rwd]
88: *
89: * Revision 2.8 92/01/03 20:21:13 dbg
90: * Add 'CountInOut' tag to routines returning variable-length
91: * inline arrays. Remove 'IsLong' tag from routines passing or
92: * returning variable-length arrays. Old routines left under
93: * 'xxx_' names. REMOVE THESE SOON!
94: * [91/11/26 dbg]
95: *
96: * Revision 2.7 91/07/31 17:53:39 dbg
97: * Add vm_wire and thread_wire.
98: * [91/07/30 17:10:17 dbg]
99: *
100: * Revision 2.6 91/05/14 16:54:32 mrt
101: * Correcting copyright
102: *
103: * Revision 2.5 91/02/05 17:33:20 mrt
104: * Changed to new Mach copyright
105: * [91/02/01 17:17:52 mrt]
106: *
107: * Revision 2.4 90/09/09 14:33:08 rpd
108: * Restored processor_set_create's out arguments.
109: * [90/08/30 rpd]
110: *
111: * Revision 2.3 90/08/07 18:00:21 rpd
112: * Removed thread_depress_abort. Changed host_processor_sets
113: * to use unprivileged ports.
114: * [90/08/06 rpd]
115: *
116: * Revision 2.2 90/06/02 14:58:17 rpd
117: * Created for new host/processor technology.
118: * [90/03/26 23:51:11 rpd]
119: *
120: * Remove KERNEL_SERVER define. Cleanup.
121: * [89/08/02 dlb]
122: * Add IsLong specifiers to variable length arguments to info calls.
123: * [89/08/02 dlb]
124: * Add thread_depress_abort.
125: * [89/06/20 dlb]
126: *
127: * Add processor_set_{tasks,threads}, host_processor_sets,
128: * host_processor_set_priv.
129: * [89/06/08 dlb]
130: *
131: * Add priority and policy calls.
132: * [89/05/12 dlb]
133: *
134: * Move type definitions to mach_types.defs, delete kernel keyword.
135: * [89/01/25 dlb]
136: *
137: * Moved to mach/ from kern/
138: * [89/01/25 dlb]
139: *
140: * Split processor_set_default. Add task_assign_default and
141: * thread_assign_default.
142: * [88/12/21 dlb]
143: *
144: * Minor cleanups, add host_kernel_version.
145: * [88/12/02 dlb]
146: *
147: * Revision 2.4 89/12/22 15:54:26 rpd
148: * Under KERNEL_SERVER, pass the out arguments of
149: * processor_set_create as port_t's. They really are
150: * the appropriate processor set types, but processor_set_create
151: * does the type conversions internally. This isn't pretty.
152: * [89/12/15 dlb]
153: *
154: * Revision 2.3 89/10/15 02:05:40 rpd
155: * Minor cleanups.
156: *
157: * Revision 2.2 89/10/11 14:38:34 dlb
158: * Add IsLong specifiers to variable length arguments to info calls.
159: * Add thread_depress_abort.
160: * Add processor_set_{tasks,threads}, host_processor_sets,
161: * host_processor_set_priv.
162: * Add priority and policy calls.
163: * Split processor_set_default. Add task_assign_default and
164: * thread_assign_default.
165: * Add host_kernel_version.
166: *
167: * Revision 2.1 89/01/30 16:17:06 dlb
168: * Created.
169: *
170: */
171:
172: /*
173: * File: mach/mach_host.defs
174: *
175: * Abstract:
176: * Mach host operations support. Includes processor allocation and
177: * control.
178: */
179:
180: subsystem
181: #if KERNEL_SERVER && defined(MACH_IPC_FLAVOR)
182: KernelServer
183: #endif KERNEL_SERVER
184: mach_host 2600;
185:
186: /*
187: * Basic types
188: */
189:
190: #include <mach/std_types.defs>
191: #include <mach/mach_types.defs>
192:
193: /*
194: * Get list of processors on this host.
195: */
196:
197: routine host_processors(
198: host_priv : host_priv_t;
199: out processor_list : processor_array_t);
200:
201: /*
202: * Return information about this host.
203: */
204:
205: routine host_info(
206: host : host_t;
207: flavor : int;
208: out host_info_out : host_info_t, IsLong);
209:
210:
211: /*
212: * Return information about this processor.
213: */
214: routine processor_info(
215: processor : processor_t;
216: flavor : int;
217: out host : host_t;
218: out processor_info_out: processor_info_t, IsLong);
219:
220: /*
221: * Start processor.
222: */
223:
224: routine processor_start(
225: processor : processor_t);
226:
227: /*
228: * Exit processor -- may not be restartable.
229: */
230:
231: routine processor_exit(
232: processor : processor_t);
233:
234: /*
235: * Do something machine-dependent to processor.
236: */
237: routine processor_control(
238: processor : processor_t;
239: processor_cmd : processor_info_t, IsLong);
240:
241: /*
242: * Get default processor set for host.
243: */
244: routine processor_set_default(
245: host : host_t;
246: out default_set : processor_set_name_t);
247:
248: /*
249: * Create new processor set. Returns real port for manipulations,
250: * and name port for obtaining information.
251: */
252: routine processor_set_create(
253: host : host_t;
254: out new_set : processor_set_t;
255: out new_name : processor_set_name_t);
256:
257: /*
258: * Destroy processor set.
259: */
260: routine processor_set_destroy(
261: set : processor_set_t);
262:
263: /*
264: * Get information about processor set.
265: */
266: routine processor_set_info(
267: set_name : processor_set_name_t;
268: flavor : int;
269: out host : host_t;
270: out info_out : processor_set_info_t, IsLong);
271:
272: /*
273: * Assign processor to processor set.
274: */
275: routine processor_assign(
276: processor : processor_t;
277: new_set : processor_set_t;
278: wait : boolean_t);
279:
280: /*
281: * Get current assignment for processor.
282: */
283:
284: routine processor_get_assignment(
285: processor : processor_t;
286: out assigned_set : processor_set_name_t);
287:
288: /*
289: * Assign thread to processor set.
290: */
291: routine thread_assign(
292: thread : thread_t;
293: new_set : processor_set_t);
294:
295: /*
296: * Assign thread to default set.
297: */
298: routine thread_assign_default(
299: thread : thread_t);
300:
301: /*
302: * Get current assignment for thread.
303: */
304: routine thread_get_assignment(
305: thread : thread_t;
306: out assigned_set : processor_set_name_t);
307:
308: /*
309: * Assign task to processor set.
310: */
311: routine task_assign(
312: task : task_t;
313: new_set : processor_set_t;
314: assign_threads : boolean_t);
315: /*
316: * Assign task to default set.
317: */
318: routine task_assign_default(
319: task : task_t;
320: assign_threads : boolean_t);
321:
322: /*
323: * Get current assignment for task.
324: */
325: routine task_get_assignment(
326: task : task_t;
327: out assigned_set : processor_set_name_t);
328:
329: /*
330: * Get string describing current kernel version.
331: */
332: routine host_kernel_version(
333: host : host_t;
334: out kernel_version : kernel_version_t);
335:
336: /*
337: * Set priority for thread.
338: */
339: routine thread_priority(
340: thread : thread_t;
341: priority : int;
342: set_max : boolean_t);
343:
344: /*
345: * Set max priority for thread.
346: */
347: routine thread_max_priority(
348: thread : thread_t;
349: processor_set : processor_set_t;
350: max_priority : int);
351:
352: /*
353: * Set task priority.
354: */
355: routine task_priority(
356: task : task_t;
357: priority : int;
358: change_threads : boolean_t);
359:
360: /*
361: * Set max priority for processor_set.
362: */
363: routine processor_set_max_priority(
364: processor_set : processor_set_t;
365: max_priority : int;
366: change_threads : boolean_t);
367:
368: /*
369: * Set policy for thread
370: */
371: routine thread_policy(
372: thread : thread_t;
373: policy : int;
374: data : int);
375:
376: /*
377: * Enable policy for processor set
378: */
379: routine processor_set_policy_enable(
380: processor_set : processor_set_t;
381: policy : int);
382:
383: /*
384: * Disable policy for processor set
385: */
386: routine processor_set_policy_disable(
387: processor_set : processor_set_t;
388: policy : int;
389: change_threads : boolean_t);
390: /*
391: * List all tasks in processor set.
392: */
393: routine processor_set_tasks(
394: processor_set : processor_set_t;
395: out task_list : task_array_t);
396:
397: /*
398: * List all threads in processor set.
399: */
400: routine processor_set_threads(
401: processor_set : processor_set_t;
402: out thread_list : thread_array_t);
403:
404: /*
405: * List all processor sets on host.
406: */
407: routine host_processor_sets(
408: host : host_t;
409: out processor_sets : processor_set_name_array_t);
410:
411: /*
412: * Get control port for a processor set.
413: */
414: routine host_processor_set_priv(
415: host_priv : host_priv_t;
416: set_name : processor_set_name_t;
417: out set : processor_set_t);
418:
419: routine thread_depress_abort(
420: thread : thread_t);
421:
422: skip; /* host_set_time */
423: skip; /* host_adjust_time */
424: skip; /* host_get_time */
425: skip; /* host_reboot */
426:
427: /*
428: ** Specify that the range of the virtual address space
429: ** of the target task must not cause page faults for
430: ** the indicated accesses.
431: **
432: ** [ To unwire the pages, specify VM_PROT_NONE. ]
433: */
434: routine vm_wire(
435: host_priv : host_priv_t;
436: task : vm_task_t;
437: address : vm_address_t;
438: size : vm_size_t;
439: acccess : vm_prot_t);
440:
441: skip; /* thread_wire */
442: skip; /* host_info: MACH 3.0 */
443: skip; /* processor_info: MACH 3.0 */
444: skip; /* processor_set_info: MACH 3.0 */
445: skip; /* processor_control: MACH 3.0 */
446: skip; /* host_get_boot_info: MACH 3.0 */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.