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