]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kern/ipc_host.h
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / kern / ipc_host.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
43866e37
A
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
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
13 * file.
14 *
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
1c79356b
A
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
43866e37
A
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.
1c79356b
A
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25/*
26 * @OSF_COPYRIGHT@
27 */
28/*
29 * Mach Operating System
30 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
31 * All Rights Reserved.
32 *
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.
38 *
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.
42 *
43 * Carnegie Mellon requests users of this software to return to
44 *
45 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
46 * School of Computer Science
47 * Carnegie Mellon University
48 * Pittsburgh PA 15213-3890
49 *
50 * any improvements or extensions that they make and grant Carnegie Mellon
51 * the rights to redistribute these changes.
52 */
53/*
54 */
55
56#ifndef _KERN_IPC_HOST_H_
57#define _KERN_IPC_HOST_H_
58
59#include <mach/port.h>
60#include <kern/kern_types.h>
61
62/* Initialize IPC host services */
63extern void ipc_host_init(void);
64
65/* Initialize ipc access to processor by allocating a port */
66extern void ipc_processor_init(
67 processor_t processor);
68
69/* Enable ipc control of processor by setting port object */
70extern void ipc_processor_enable(
71 processor_t processor);
72
73/* Initialize ipc control of a processor set */
74extern void ipc_pset_init(
75 processor_set_t pset);
76
77/* Enable ipc access to a processor set */
78extern void ipc_pset_enable(
79 processor_set_t pset);
80
81/* Disable ipc access to a processor set */
82extern void ipc_pset_disable(
83 processor_set_t pset);
84
85/* Deallocate the ipc control structures for a processor set */
86extern void ipc_pset_terminate(
87 processor_set_t pset);
88
89/* Initialize ipc control of a clock */
90extern void ipc_clock_init(
91 clock_t clock);
92
93/* Enable ipc access to a clock */
94extern void ipc_clock_enable(
95 clock_t clock);
96
97/* Convert from a port to a clock */
98extern clock_t convert_port_to_clock(
99 ipc_port_t port);
100
101/* Convert from a port to a clock control */
102extern clock_t convert_port_to_clock_ctrl(
103 ipc_port_t port);
104
105/* Convert from a clock to a port */
106extern ipc_port_t convert_clock_to_port(
107 clock_t clock);
108
109/* Convert from a clock control to a port */
110extern ipc_port_t convert_clock_ctrl_to_port(
111 clock_t clock);
112
113/* Convert from a clock name to a clock pointer */
114extern clock_t port_name_to_clock(
115 mach_port_name_t clock_name);
116
117/* Convert from a port to a host */
118extern host_t convert_port_to_host(
119 ipc_port_t port);
120
121/* Convert from a port to a host privilege port */
122extern host_t convert_port_to_host_priv(
123 ipc_port_t port);
124
125/* Convert from a port to a host paging port */
126extern host_t convert_port_to_host_paging(
127 ipc_port_t port);
128
129/* Convert from a host to a port */
130extern ipc_port_t convert_host_to_port(
131 host_t host);
132
133/* Convert from a port to a processor */
134extern processor_t convert_port_to_processor(
135 ipc_port_t port);
136
137/* Convert from a processor to a port */
138extern ipc_port_t convert_processor_to_port(
139 processor_t processor);
140
141/* Convert from a port to a processor set */
142extern processor_set_t convert_port_to_pset(
143 ipc_port_t port);
144
145/* Convert from a port to a processor set name */
146extern processor_set_t convert_port_to_pset_name(
147 ipc_port_t port);
148
149/* Convert from a processor set to a port */
150extern ipc_port_t convert_pset_to_port(
151 processor_set_t processor);
152
153/* Convert from a processor set name to a port */
154extern ipc_port_t convert_pset_name_to_port(
155 processor_set_t processor);
156
157/* Convert from a port to a host security port */
158extern host_t convert_port_to_host_security(
159 ipc_port_t port);
160
161
162#endif /* _KERN_IPC_HOST_H_ */