1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: ipc_kobject.h,v $
29 * Revision 2.9 93/01/14 17:34:30 danner
30 * ipc_kobject_t is casted sometimes to a pointer.
31 * [92/07/24 af]
32 *
33 * Revision 2.8 92/03/10 16:26:31 jsb
34 * Added IKOT_XMM_{OBJECT,KERNEL,REPLY} and IKOT_PAGER_TERMINATING.
35 * [92/03/07 08:25:33 jsb]
36 *
37 * Revision 2.7 92/01/14 16:44:52 rpd
38 * Added IKOT_PAGING_NAME.
39 * [91/12/28 rpd]
40 *
41 * Revision 2.6 91/08/28 11:14:31 jsb
42 * Add support for using page lists with devices. Split the macro
43 * that says whether to use page lists into a macro that says whether
44 * to use them (vm_page_list) and a macro that says whether the pages
45 * should be stolen (vm_page_steal).
46 * [91/07/31 15:05:17 dlb]
47 *
48 * Revision 2.5 91/07/01 08:24:58 jsb
49 * For NORMA_VM: added IKOT_XMM_PAGER, for memory_objects mapped only
50 * by other kernels.
51 *
52 * From David Black at OSF: added ipc_kobject_vm_special.
53 * [91/06/29 14:33:34 jsb]
54 *
55 * Revision 2.4 91/05/14 16:42:08 mrt
56 * Correcting copyright
57 *
58 * Revision 2.3 91/02/05 17:26:40 mrt
59 * Changed to new Mach copyright
60 * [91/02/01 16:12:58 mrt]
61 *
62 * Revision 2.2 90/06/02 14:54:12 rpd
63 * Created for new IPC.
64 * [90/03/26 23:47:04 rpd]
65 *
66 */
67 /*
68 * File: kern/ipc_kobject.h
69 * Author: Rich Draves
70 * Date: 1989
71 *
72 * Declarations for letting a port represent a kernel object.
73 */
74
75 #ifndef _KERN_IPC_KOBJECT_H_
76 #define _KERN_IPC_KOBJECT_H_
77
78 #include <mach/machine/vm_types.h>
79
80 typedef vm_offset_t ipc_kobject_t;
81
82 #define IKO_NULL ((ipc_kobject_t) 0)
83
84 typedef unsigned int 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_PAGER 8
95 #define IKOT_PAGER_TERMINATING 9
96 #define IKOT_PAGING_REQUEST 10
97 #define IKOT_PAGING_NAME 11
98 #define IKOT_DEVICE 12
99 #define IKOT_XMM_PAGER 13
100 #define IKOT_XMM_OBJECT 14
101 #define IKOT_XMM_KERNEL 15
102 #define IKOT_XMM_REPLY 16
103
104 /*
105 * Define types of kernel objects that use page lists instead
106 * of entry lists for copyin of out of line memory.
107 */
108
109 #define ipc_kobject_vm_page_list(ikot) \
110 ((ikot == IKOT_PAGING_REQUEST) || (ikot == IKOT_DEVICE))
111
112 #define ipc_kobject_vm_page_steal(ikot) (ikot == IKOT_PAGING_REQUEST)
113
114 extern struct ipc_kmsg *
115 ipc_kobject_server(/* ipc_kmsg_t */);
116
117 extern void
118 ipc_kobject_set(/* ipc_port_t, ipc_kobject_t, ipc_kobject_type_t */);
119
120 extern void
121 ipc_kobject_destroy(/* ipc_port_t */);
122
123 #define null_conversion(port) (port)
124
125 #endif _KERN_IPC_KOBJECT_H_
Cache object: d0198804da2e6101985bc84ad4aa1a4f
|