home *** CD-ROM | disk | FTP | other *** search
- /*
- * 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 Software.Distribution@CS.CMU.EDU
- * 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 2.10 92/03/10 16:26:54 jsb
- * From durriya@ri.osf.org: 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(NEW_MACH_IPC)
- 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);
-
- #ifndef NeXT
- /*
- * Get rights to default processor set for host.
- * Replaced by host_processor_set_priv.
- */
- routine xxx_processor_set_default_priv(
- host : host_priv_t;
- out default_set : processor_set_t);
- #endif NeXT
-
- /*
- * 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);
-
- /*
- * Set the time on this host.
- * Only available to privileged users.
- */
- routine host_set_time(
- host_priv : host_priv_t;
- new_time : time_value_t);
-
- /*
- * Arrange for the time on this host to be gradually changed
- * by an adjustment value, and return the old value.
- * Only available to privileged users.
- */
- routine host_adjust_time(
- host_priv : host_priv_t;
- in new_adjustment : time_value_t;
- out old_adjustment : time_value_t);
-
- /*
- * Get the time on this host.
- * Available to all.
- */
- routine host_get_time(
- host : host_t;
- out current_time : time_value_t);
-
- skip; /* host_reboot */
- skip; /* vm_wire */
- 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 */
-