]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
91447636 | 2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. |
1c79356b | 3 | * |
8ad349bb | 4 | * @APPLE_LICENSE_OSREFERENCE_HEADER_START@ |
1c79356b | 5 | * |
8ad349bb A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. The rights granted to you under the | |
10 | * License may not be used to create, or enable the creation or | |
11 | * redistribution of, unlawful or unlicensed copies of an Apple operating | |
12 | * system, or to circumvent, violate, or enable the circumvention or | |
13 | * violation of, any terms of an Apple operating system software license | |
14 | * agreement. | |
15 | * | |
16 | * Please obtain a copy of the License at | |
17 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
18 | * file. | |
19 | * | |
20 | * The Original Code and all software distributed under the License are | |
21 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
22 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
23 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
24 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
25 | * Please see the License for the specific language governing rights and | |
26 | * limitations under the License. | |
27 | * | |
28 | * @APPLE_LICENSE_OSREFERENCE_HEADER_END@ | |
1c79356b A |
29 | */ |
30 | /* | |
31 | * @OSF_COPYRIGHT@ | |
32 | */ | |
33 | /* | |
34 | * Mach Operating System | |
35 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | |
36 | * All Rights Reserved. | |
37 | * | |
38 | * Permission to use, copy, modify and distribute this software and its | |
39 | * documentation is hereby granted, provided that both the copyright | |
40 | * notice and this permission notice appear in all copies of the | |
41 | * software, derivative works or modified versions, and any portions | |
42 | * thereof, and that both notices appear in supporting documentation. | |
43 | * | |
44 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
45 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
46 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
47 | * | |
48 | * Carnegie Mellon requests users of this software to return to | |
49 | * | |
50 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
51 | * School of Computer Science | |
52 | * Carnegie Mellon University | |
53 | * Pittsburgh PA 15213-3890 | |
54 | * | |
55 | * any improvements or extensions that they make and grant Carnegie Mellon | |
56 | * the rights to redistribute these changes. | |
57 | */ | |
58 | /* | |
59 | */ | |
60 | /* | |
61 | * File: kern/ipc_kobject.h | |
62 | * Author: Rich Draves | |
63 | * Date: 1989 | |
64 | * | |
65 | * Declarations for letting a port represent a kernel object. | |
66 | */ | |
67 | ||
68 | #include <ipc/ipc_kmsg.h> | |
69 | #include <ipc/ipc_port.h> | |
70 | ||
71 | #ifndef _KERN_IPC_KOBJECT_H_ | |
72 | #define _KERN_IPC_KOBJECT_H_ | |
73 | ||
74 | #ifdef KERNEL_PRIVATE | |
75 | /* | |
76 | * This is the legacy in-kernel ipc-object mechanism. Over the next | |
77 | * several months, this will be phased out in favor of a mechanism that | |
78 | * is less Mach IPC specific, and common across in-mach, in-kernel-component, | |
79 | * and user-level-component (Plugin) models. | |
80 | */ | |
81 | #include <mach/machine/vm_types.h> | |
82 | #include <mach/mach_types.h> | |
83 | ||
84 | typedef natural_t ipc_kobject_type_t; | |
85 | ||
86 | #define IKOT_NONE 0 | |
87 | #define IKOT_THREAD 1 | |
88 | #define IKOT_TASK 2 | |
89 | #define IKOT_HOST 3 | |
90 | #define IKOT_HOST_PRIV 4 | |
91 | #define IKOT_PROCESSOR 5 | |
92 | #define IKOT_PSET 6 | |
93 | #define IKOT_PSET_NAME 7 | |
94 | #define IKOT_TIMER 8 | |
95 | #define IKOT_PAGING_REQUEST 9 | |
0b4e3aa0 A |
96 | #define IKOT_MIG 10 |
97 | #define IKOT_MEMORY_OBJECT 11 | |
1c79356b A |
98 | #define IKOT_XMM_PAGER 12 |
99 | #define IKOT_XMM_KERNEL 13 | |
100 | #define IKOT_XMM_REPLY 14 | |
101 | #define IKOT_UND_REPLY 15 | |
55e303ae | 102 | #define IKOT_HOST_NOTIFY 16 |
1c79356b A |
103 | #define IKOT_HOST_SECURITY 17 |
104 | #define IKOT_LEDGER 18 | |
105 | #define IKOT_MASTER_DEVICE 19 | |
8ad349bb | 106 | /* (unused) 20 */ |
1c79356b A |
107 | #define IKOT_SUBSYSTEM 21 |
108 | #define IKOT_IO_DONE_QUEUE 22 | |
109 | #define IKOT_SEMAPHORE 23 | |
110 | #define IKOT_LOCK_SET 24 | |
111 | #define IKOT_CLOCK 25 | |
112 | #define IKOT_CLOCK_CTRL 26 | |
113 | #define IKOT_IOKIT_SPARE 27 | |
114 | #define IKOT_NAMED_ENTRY 28 | |
115 | #define IKOT_IOKIT_CONNECT 29 | |
116 | #define IKOT_IOKIT_OBJECT 30 | |
117 | #define IKOT_UPL 31 | |
8ad349bb A |
118 | /* << new entries here */ |
119 | #define IKOT_UNKNOWN 32 /* magic catchall */ | |
120 | #define IKOT_MAX_TYPE 33 /* # of IKOT_ types */ | |
1c79356b | 121 | |
8ad349bb | 122 | /* Please keep ipc/ipc_object.c:ikot_print_array up to date */ |
1c79356b A |
123 | |
124 | #define is_ipc_kobject(ikot) ((ikot) != IKOT_NONE) | |
125 | ||
126 | /* | |
127 | * Define types of kernel objects that use page lists instead | |
128 | * of entry lists for copyin of out of line memory. | |
129 | */ | |
130 | ||
1c79356b A |
131 | /* Dispatch a kernel server function */ |
132 | extern ipc_kmsg_t ipc_kobject_server( | |
133 | ipc_kmsg_t request); | |
134 | ||
135 | /* Make a port represent a kernel object of the given type */ | |
136 | extern void ipc_kobject_set( | |
137 | ipc_port_t port, | |
138 | ipc_kobject_t kobject, | |
139 | ipc_kobject_type_t type); | |
140 | ||
141 | extern void ipc_kobject_set_atomically( | |
142 | ipc_port_t port, | |
143 | ipc_kobject_t kobject, | |
144 | ipc_kobject_type_t type); | |
145 | ||
146 | /* Release any kernel object resources associated with a port */ | |
147 | extern void ipc_kobject_destroy( | |
148 | ipc_port_t port); | |
149 | ||
150 | #define null_conversion(port) (port) | |
151 | ||
152 | #endif /* KERNEL_PRIVATE */ | |
153 | ||
154 | #endif /* _KERN_IPC_KOBJECT_H_ */ |