]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/i386/machine_types.defs
c846e83177d1595693aab461120ffb60f51c4778
[apple/xnu.git] / osfmk / mach / i386 / machine_types.defs
1 /*
2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * @OSF_COPYRIGHT@
25 */
26
27 /*
28 * Header file for basic, machine-dependent data types. i386 version.
29 */
30
31 #ifndef _MACHINE_VM_TYPES_DEFS_
32 #define _MACHINE_VM_TYPES_DEFS_ 1
33
34 type short = int16_t;
35 type int = int32_t;
36 type unsigned = uint32_t;
37
38 type float = MACH_MSG_TYPE_REAL_32;
39 type double = MACH_MSG_TYPE_REAL_64;
40
41
42 /* from ISO/IEC 988:1999 spec */
43 /* 7.18.1.4 Integer types capable of hgolding object pointers */
44 /*
45 * The [u]intptr_t types for the native
46 * integer type, e.g. 32 or 64 or.. whatever
47 * register size the machine has. They are
48 * used for entities that might be either
49 * [unsigned] integers or pointers, and for
50 * type-casting between the two.
51 *
52 * For instance, the IPC system represents
53 * a port in user space as an integer and
54 * in kernel space as a pointer.
55 */
56 type uintptr_t = uint32_t;
57 type intptr_t = int32_t;
58
59 /*
60 * These are the legacy Mach types that are
61 * the [rough] equivalents of the standards above.
62 * They were defined in terms of int, not
63 * long int, so they remain separate.
64 */
65 type register_t = int32_t;
66 type integer_t = int32_t;
67 type natural_t = uint32_t;
68
69 /*
70 * These are the VM types that scale with the address
71 * space size of a given process.
72 */
73 type vm_address_t = natural_t;
74 type vm_offset_t = natural_t;
75 type vm_size_t = natural_t;
76
77 /*
78 * The mach_vm_xxx_t types are sized to hold the
79 * maximum pointer, offset, etc... supported on the
80 * platform.
81 */
82 type mach_vm_address_t = uint32_t;
83 type mach_vm_offset_t = uint32_t;
84 type mach_vm_size_t = uint32_t;
85
86 #if MACH_IPC_COMPAT
87 /*
88 * For the old IPC interface
89 */
90 #define MSG_TYPE_PORT_NAME natural_t
91
92 #endif /* MACH_IPC_COMPAT */
93
94 #endif /* _MACHINE_VM_TYPES_DEFS_ */