2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
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.
23 * @APPLE_LICENSE_HEADER_END@
29 * Mach Operating System
30 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
31 * All Rights Reserved.
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.
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.
43 * Carnegie Mellon requests users of this software to return to
45 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
46 * School of Computer Science
47 * Carnegie Mellon University
48 * Pittsburgh PA 15213-3890
50 * any improvements or extensions that they make and grant Carnegie Mellon
51 * the rights to redistribute these changes.
56 #ifndef _KERN_IPC_HOST_H_
57 #define _KERN_IPC_HOST_H_
59 #include <mach/port.h>
60 #include <kern/kern_types.h>
62 /* Initialize IPC host services */
63 extern void ipc_host_init(void);
65 /* Initialize ipc access to processor by allocating a port */
66 extern void ipc_processor_init(
67 processor_t processor
);
69 /* Enable ipc control of processor by setting port object */
70 extern void ipc_processor_enable(
71 processor_t processor
);
73 /* Initialize ipc control of a processor set */
74 extern void ipc_pset_init(
75 processor_set_t pset
);
77 /* Enable ipc access to a processor set */
78 extern void ipc_pset_enable(
79 processor_set_t pset
);
81 /* Disable ipc access to a processor set */
82 extern void ipc_pset_disable(
83 processor_set_t pset
);
85 /* Deallocate the ipc control structures for a processor set */
86 extern void ipc_pset_terminate(
87 processor_set_t pset
);
89 /* Initialize ipc control of a clock */
90 extern void ipc_clock_init(
93 /* Enable ipc access to a clock */
94 extern void ipc_clock_enable(
97 /* Convert from a port to a clock */
98 extern clock_t convert_port_to_clock(
101 /* Convert from a port to a clock control */
102 extern clock_t convert_port_to_clock_ctrl(
105 /* Convert from a clock to a port */
106 extern ipc_port_t
convert_clock_to_port(
109 /* Convert from a clock control to a port */
110 extern ipc_port_t
convert_clock_ctrl_to_port(
113 /* Convert from a clock name to a clock pointer */
114 extern clock_t port_name_to_clock(
115 mach_port_name_t clock_name
);
117 /* Convert from a port to a host */
118 extern host_t
convert_port_to_host(
121 /* Convert from a port to a host privilege port */
122 extern host_t
convert_port_to_host_priv(
125 /* Convert from a port to a host paging port */
126 extern host_t
convert_port_to_host_paging(
129 /* Convert from a host to a port */
130 extern ipc_port_t
convert_host_to_port(
133 /* Convert from a port to a processor */
134 extern processor_t
convert_port_to_processor(
137 /* Convert from a processor to a port */
138 extern ipc_port_t
convert_processor_to_port(
139 processor_t processor
);
141 /* Convert from a port to a processor set */
142 extern processor_set_t
convert_port_to_pset(
145 /* Convert from a port to a processor set name */
146 extern processor_set_t
convert_port_to_pset_name(
149 /* Convert from a processor set to a port */
150 extern ipc_port_t
convert_pset_to_port(
151 processor_set_t processor
);
153 /* Convert from a processor set name to a port */
154 extern ipc_port_t
convert_pset_name_to_port(
155 processor_set_t processor
);
157 /* Convert from a port to a host security port */
158 extern host_t
convert_port_to_host_security(
162 #endif /* _KERN_IPC_HOST_H_ */