Source to mach/mach_host.defs
/*
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
* Reserved. This file contains Original Code and/or Modifications of
* Original Code as defined in and that are subject to the Apple Public
* Source License Version 1.0 (the 'License'). You may not use this file
* except in compliance with the License. Please obtain a copy of the
* License at http://www.apple.com/publicsource and read it before using
* this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
* License for the specific language governing rights and limitations
* under the License."
*
* @APPLE_LICENSE_HEADER_END@
*/
/*
* Mach Operating System
* Copyright (c) 1991,1990,1989 Carnegie Mellon University
* All Rights Reserved.
*
* Permission to use, copy, modify and distribute this software and its
* documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
* ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or [email protected]
* School of Computer Science
* Carnegie Mellon University
* Pittsburgh PA 15213-3890
*
* any improvements or extensions that they make and grant Carnegie Mellon
* the rights to redistribute these changes.
*/
/*
* HISTORY
* $Log: mach_host.defs,v $
* Revision 1.2.218.4 1999/03/16 17:05:39 wsanchez
* Substitute License
*
* Revision 1.2.218.3 1999/03/16 15:28:02 wsanchez
* Substitute copyright
*
* Revision 1.2.218.2 1999/03/16 10:37:38 umeshv
* Fixed errors in previous commit.
*
* Revision 1.2.218.1 1999/03/11 09:52:49 umeshv
* Added copyrights.
*
* Revision 1.2 1998/11/25 19:39:12 wsanchez
* Merged in PR-2288345 (mwatson: mach_host.defs id's offset by one)
*
* Revision 1.1.1.1.440.1 1998/11/24 19:30:54 mwatson
* Remove unused routine, now that -DNeXT is gone.
*
* Revision 1.1.1.1 1997/09/30 02:44:50 wsanchez
* Import of kernel from umeshv/kernel
*
* Revision 2.10 92/03/10 16:26:54 jsb
* From [email protected]: added host_get_boot_info.
* [92/01/08 15:01:12 jsb]
*
* Revision 2.9 92/02/19 16:07:19 elf
* Reenable thread_depress_abort.
* [92/01/20 rwd]
*
* Revision 2.8 92/01/03 20:21:13 dbg
* Add 'CountInOut' tag to routines returning variable-length
* inline arrays. Remove 'IsLong' tag from routines passing or
* returning variable-length arrays. Old routines left under
* 'xxx_' names. REMOVE THESE SOON!
* [91/11/26 dbg]
*
* Revision 2.7 91/07/31 17:53:39 dbg
* Add vm_wire and thread_wire.
* [91/07/30 17:10:17 dbg]
*
* Revision 2.6 91/05/14 16:54:32 mrt
* Correcting copyright
*
* Revision 2.5 91/02/05 17:33:20 mrt
* Changed to new Mach copyright
* [91/02/01 17:17:52 mrt]
*
* Revision 2.4 90/09/09 14:33:08 rpd
* Restored processor_set_create's out arguments.
* [90/08/30 rpd]
*
* Revision 2.3 90/08/07 18:00:21 rpd
* Removed thread_depress_abort. Changed host_processor_sets
* to use unprivileged ports.
* [90/08/06 rpd]
*
* Revision 2.2 90/06/02 14:58:17 rpd
* Created for new host/processor technology.
* [90/03/26 23:51:11 rpd]
*
* Remove KERNEL_SERVER define. Cleanup.
* [89/08/02 dlb]
* Add IsLong specifiers to variable length arguments to info calls.
* [89/08/02 dlb]
* Add thread_depress_abort.
* [89/06/20 dlb]
*
* Add processor_set_{tasks,threads}, host_processor_sets,
* host_processor_set_priv.
* [89/06/08 dlb]
*
* Add priority and policy calls.
* [89/05/12 dlb]
*
* Move type definitions to mach_types.defs, delete kernel keyword.
* [89/01/25 dlb]
*
* Moved to mach/ from kern/
* [89/01/25 dlb]
*
* Split processor_set_default. Add task_assign_default and
* thread_assign_default.
* [88/12/21 dlb]
*
* Minor cleanups, add host_kernel_version.
* [88/12/02 dlb]
*
* Revision 2.4 89/12/22 15:54:26 rpd
* Under KERNEL_SERVER, pass the out arguments of
* processor_set_create as port_t's. They really are
* the appropriate processor set types, but processor_set_create
* does the type conversions internally. This isn't pretty.
* [89/12/15 dlb]
*
* Revision 2.3 89/10/15 02:05:40 rpd
* Minor cleanups.
*
* Revision 2.2 89/10/11 14:38:34 dlb
* Add IsLong specifiers to variable length arguments to info calls.
* Add thread_depress_abort.
* Add processor_set_{tasks,threads}, host_processor_sets,
* host_processor_set_priv.
* Add priority and policy calls.
* Split processor_set_default. Add task_assign_default and
* thread_assign_default.
* Add host_kernel_version.
*
* Revision 2.1 89/01/30 16:17:06 dlb
* Created.
*
*/
/*
* File: mach/mach_host.defs
*
* Abstract:
* Mach host operations support. Includes processor allocation and
* control.
*/
subsystem
#if KERNEL_SERVER && defined(MACH_IPC_FLAVOR)
KernelServer
#endif KERNEL_SERVER
mach_host 2600;
/*
* Basic types
*/
#include <mach/std_types.defs>
#include <mach/mach_types.defs>
/*
* Get list of processors on this host.
*/
routine host_processors(
host_priv : host_priv_t;
out processor_list : processor_array_t);
/*
* Return information about this host.
*/
routine host_info(
host : host_t;
flavor : int;
out host_info_out : host_info_t, IsLong);
/*
* Return information about this processor.
*/
routine processor_info(
processor : processor_t;
flavor : int;
out host : host_t;
out processor_info_out: processor_info_t, IsLong);
/*
* Start processor.
*/
routine processor_start(
processor : processor_t);
/*
* Exit processor -- may not be restartable.
*/
routine processor_exit(
processor : processor_t);
/*
* Do something machine-dependent to processor.
*/
routine processor_control(
processor : processor_t;
processor_cmd : processor_info_t, IsLong);
/*
* Get default processor set for host.
*/
routine processor_set_default(
host : host_t;
out default_set : processor_set_name_t);
/*
* Create new processor set. Returns real port for manipulations,
* and name port for obtaining information.
*/
routine processor_set_create(
host : host_t;
out new_set : processor_set_t;
out new_name : processor_set_name_t);
/*
* Destroy processor set.
*/
routine processor_set_destroy(
set : processor_set_t);
/*
* Get information about processor set.
*/
routine processor_set_info(
set_name : processor_set_name_t;
flavor : int;
out host : host_t;
out info_out : processor_set_info_t, IsLong);
/*
* Assign processor to processor set.
*/
routine processor_assign(
processor : processor_t;
new_set : processor_set_t;
wait : boolean_t);
/*
* Get current assignment for processor.
*/
routine processor_get_assignment(
processor : processor_t;
out assigned_set : processor_set_name_t);
/*
* Assign thread to processor set.
*/
routine thread_assign(
thread : thread_t;
new_set : processor_set_t);
/*
* Assign thread to default set.
*/
routine thread_assign_default(
thread : thread_t);
/*
* Get current assignment for thread.
*/
routine thread_get_assignment(
thread : thread_t;
out assigned_set : processor_set_name_t);
/*
* Assign task to processor set.
*/
routine task_assign(
task : task_t;
new_set : processor_set_t;
assign_threads : boolean_t);
/*
* Assign task to default set.
*/
routine task_assign_default(
task : task_t;
assign_threads : boolean_t);
/*
* Get current assignment for task.
*/
routine task_get_assignment(
task : task_t;
out assigned_set : processor_set_name_t);
/*
* Get string describing current kernel version.
*/
routine host_kernel_version(
host : host_t;
out kernel_version : kernel_version_t);
/*
* Set priority for thread.
*/
routine thread_priority(
thread : thread_t;
priority : int;
set_max : boolean_t);
/*
* Set max priority for thread.
*/
routine thread_max_priority(
thread : thread_t;
processor_set : processor_set_t;
max_priority : int);
/*
* Set task priority.
*/
routine task_priority(
task : task_t;
priority : int;
change_threads : boolean_t);
/*
* Set max priority for processor_set.
*/
routine processor_set_max_priority(
processor_set : processor_set_t;
max_priority : int;
change_threads : boolean_t);
/*
* Set policy for thread
*/
routine thread_policy(
thread : thread_t;
policy : int;
data : int);
/*
* Enable policy for processor set
*/
routine processor_set_policy_enable(
processor_set : processor_set_t;
policy : int);
/*
* Disable policy for processor set
*/
routine processor_set_policy_disable(
processor_set : processor_set_t;
policy : int;
change_threads : boolean_t);
/*
* List all tasks in processor set.
*/
routine processor_set_tasks(
processor_set : processor_set_t;
out task_list : task_array_t);
/*
* List all threads in processor set.
*/
routine processor_set_threads(
processor_set : processor_set_t;
out thread_list : thread_array_t);
/*
* List all processor sets on host.
*/
routine host_processor_sets(
host : host_t;
out processor_sets : processor_set_name_array_t);
/*
* Get control port for a processor set.
*/
routine host_processor_set_priv(
host_priv : host_priv_t;
set_name : processor_set_name_t;
out set : processor_set_t);
routine thread_depress_abort(
thread : thread_t);
skip; /* host_set_time */
skip; /* host_adjust_time */
skip; /* host_get_time */
skip; /* host_reboot */
/*
** Specify that the range of the virtual address space
** of the target task must not cause page faults for
** the indicated accesses.
**
** [ To unwire the pages, specify VM_PROT_NONE. ]
*/
routine vm_wire(
host_priv : host_priv_t;
task : vm_task_t;
address : vm_address_t;
size : vm_size_t;
acccess : vm_prot_t);
skip; /* thread_wire */
skip; /* host_info: MACH 3.0 */
skip; /* processor_info: MACH 3.0 */
skip; /* processor_set_info: MACH 3.0 */
skip; /* processor_control: MACH 3.0 */
skip; /* host_get_boot_info: MACH 3.0 */