]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/i386/vm_types.h
ae562ea625c30cc8fe8c7a510f5afa8d1d742e17
[apple/xnu.git] / osfmk / mach / i386 / vm_types.h
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 * HISTORY
27 *
28 * Revision 1.1.1.1 1998/09/22 21:05:31 wsanchez
29 * Import of Mac OS X kernel (~semeria)
30 *
31 * Revision 1.1.1.1 1998/03/07 02:25:47 wsanchez
32 * Import of OSF Mach kernel (~mburg)
33 *
34 * Revision 1.2.8.2 1995/01/06 19:50:48 devrcs
35 * mk6 CR668 - 1.3b26 merge
36 * 64bit cleanup
37 * [1994/10/14 03:42:42 dwm]
38 *
39 * Revision 1.2.8.1 1994/09/23 02:38:01 ezf
40 * change marker to not FREE
41 * [1994/09/22 21:40:30 ezf]
42 *
43 * Revision 1.2.2.2 1993/06/09 02:41:01 gm
44 * Added to OSF/1 R1.3 from NMK15.0.
45 * [1993/06/02 21:16:38 jeffc]
46 *
47 * Revision 1.2 1993/04/19 16:34:37 devrcs
48 * ansi C conformance changes
49 * [1993/02/02 18:56:34 david]
50 *
51 * Revision 1.1 1992/09/30 02:30:57 robert
52 * Initial revision
53 *
54 * $EndLog$
55 */
56 /* CMU_HIST */
57 /*
58 * Revision 2.4 91/05/14 16:53:00 mrt
59 * Correcting copyright
60 *
61 * Revision 2.3 91/02/05 17:32:34 mrt
62 * Changed to new Mach copyright
63 * [91/02/01 17:10:49 mrt]
64 *
65 * Revision 2.2 90/05/03 15:48:32 dbg
66 * First checkin.
67 *
68 * Revision 1.3 89/03/09 20:20:12 rpd
69 * More cleanup.
70 *
71 * Revision 1.2 89/02/26 13:01:20 gm0w
72 * Changes for cleanup.
73 *
74 * 31-Dec-88 Robert Baron (rvb) at Carnegie-Mellon University
75 * Derived from MACH2.0 vax release.
76 *
77 * 23-Apr-87 Michael Young (mwyoung) at Carnegie-Mellon University
78 * Changed things to "unsigned int" to appease the user community :-).
79 *
80 */
81 /* CMU_ENDHIST */
82 /*
83 * Mach Operating System
84 * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University
85 * All Rights Reserved.
86 *
87 * Permission to use, copy, modify and distribute this software and its
88 * documentation is hereby granted, provided that both the copyright
89 * notice and this permission notice appear in all copies of the
90 * software, derivative works or modified versions, and any portions
91 * thereof, and that both notices appear in supporting documentation.
92 *
93 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
94 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
95 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
96 *
97 * Carnegie Mellon requests users of this software to return to
98 *
99 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
100 * School of Computer Science
101 * Carnegie Mellon University
102 * Pittsburgh PA 15213-3890
103 *
104 * any improvements or extensions that they make and grant Carnegie Mellon
105 * the rights to redistribute these changes.
106 */
107 /*
108 */
109
110 /*
111 * File: vm_types.h
112 * Author: Avadis Tevanian, Jr.
113 * Date: 1985
114 *
115 * Header file for VM data types. I386 version.
116 */
117
118 #ifndef _MACH_I386_VM_TYPES_H_
119 #define _MACH_I386_VM_TYPES_H_
120
121 #ifdef ASSEMBLER
122 #else /* ASSEMBLER */
123
124 /*
125 * A natural_t is the type for the native
126 * integer type, e.g. 32 or 64 or.. whatever
127 * register size the machine has. Unsigned, it is
128 * used for entities that might be either
129 * unsigned integers or pointers, and for
130 * type-casting between the two.
131 * For instance, the IPC system represents
132 * a port in user space as an integer and
133 * in kernel space as a pointer.
134 */
135 typedef unsigned int natural_t;
136
137 /*
138 * An integer_t is the signed counterpart
139 * of the natural_t type. Both types are
140 * only supposed to be used to define
141 * other types in a machine-independent
142 * way.
143 */
144 typedef int integer_t;
145
146 #ifdef MACH_KERNEL_PRIVATE
147 /*
148 * An int32 is an integer that is at least 32 bits wide
149 */
150 typedef int int32;
151 typedef unsigned int uint32;
152 #endif
153
154 /*
155 * A vm_offset_t is a type-neutral pointer,
156 * e.g. an offset into a virtual memory space.
157 */
158 typedef natural_t vm_offset_t;
159
160 /*
161 * A vm_size_t is the proper type for e.g.
162 * expressing the difference between two
163 * vm_offset_t entities.
164 */
165 typedef natural_t vm_size_t;
166
167 #endif /* ASSEMBLER */
168
169 /*
170 * If composing messages by hand (please dont)
171 */
172
173 #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32
174
175 #endif /* _MACH_I386_VM_TYPES_H_ */