2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
26 * Mach Operating System
27 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
28 * All Rights Reserved.
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.
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.
40 * Carnegie Mellon requests users of this software to return to
42 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
43 * School of Computer Science
44 * Carnegie Mellon University
45 * Pittsburgh PA 15213-3890
47 * any improvements or extensions that they make and grant Carnegie Mellon
48 * the rights to redistribute these changes.
53 #ifndef _KERN_IPC_HOST_H_
54 #define _KERN_IPC_HOST_H_
56 #include <mach/port.h>
57 #include <kern/kern_types.h>
59 /* Initialize IPC host services */
60 extern void ipc_host_init(void);
62 /* Initialize ipc access to processor by allocating a port */
63 extern void ipc_processor_init(
64 processor_t processor
);
66 /* Enable ipc control of processor by setting port object */
67 extern void ipc_processor_enable(
68 processor_t processor
);
70 /* Initialize ipc control of a processor set */
71 extern void ipc_pset_init(
72 processor_set_t pset
);
74 /* Enable ipc access to a processor set */
75 extern void ipc_pset_enable(
76 processor_set_t pset
);
78 /* Disable ipc access to a processor set */
79 extern void ipc_pset_disable(
80 processor_set_t pset
);
82 /* Deallocate the ipc control structures for a processor set */
83 extern void ipc_pset_terminate(
84 processor_set_t pset
);
86 /* Initialize ipc control of a clock */
87 extern void ipc_clock_init(
90 /* Enable ipc access to a clock */
91 extern void ipc_clock_enable(
94 /* Convert from a port to a clock */
95 extern clock_t convert_port_to_clock(
98 /* Convert from a port to a clock control */
99 extern clock_t convert_port_to_clock_ctrl(
102 /* Convert from a clock to a port */
103 extern ipc_port_t
convert_clock_to_port(
106 /* Convert from a clock control to a port */
107 extern ipc_port_t
convert_clock_ctrl_to_port(
110 /* Convert from a clock name to a clock pointer */
111 extern clock_t port_name_to_clock(
112 mach_port_name_t clock_name
);
114 /* Convert from a port to a host */
115 extern host_t
convert_port_to_host(
118 /* Convert from a port to a host privilege port */
119 extern host_t
convert_port_to_host_priv(
122 /* Convert from a port to a host paging port */
123 extern host_t
convert_port_to_host_paging(
126 /* Convert from a host to a port */
127 extern ipc_port_t
convert_host_to_port(
130 /* Convert from a port to a processor */
131 extern processor_t
convert_port_to_processor(
134 /* Convert from a processor to a port */
135 extern ipc_port_t
convert_processor_to_port(
136 processor_t processor
);
138 /* Convert from a port to a processor set */
139 extern processor_set_t
convert_port_to_pset(
142 /* Convert from a port to a processor set name */
143 extern processor_set_t
convert_port_to_pset_name(
146 /* Convert from a processor set to a port */
147 extern ipc_port_t
convert_pset_to_port(
148 processor_set_t processor
);
150 /* Convert from a processor set name to a port */
151 extern ipc_port_t
convert_pset_name_to_port(
152 processor_set_t processor
);
154 /* Convert from a port to a host security port */
155 extern host_t
convert_port_to_host_security(
159 #endif /* _KERN_IPC_HOST_H_ */