]> git.saurik.com Git - apple/xnu.git/blob - osfmk/mach/i386/machine_types.defs
d6cb4af546d5a9e3fe2dc22d2e76a56af022ff3f
[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 * 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 /*
27 * Header file for basic, machine-dependent data types. i386 version.
28 */
29
30 #ifndef _MACHINE_VM_TYPES_DEFS_
31 #define _MACHINE_VM_TYPES_DEFS_ 1
32
33 type short = int16_t;
34 type int = int32_t;
35 type unsigned = uint32_t;
36
37 type float = MACH_MSG_TYPE_REAL_32;
38 type double = MACH_MSG_TYPE_REAL_64;
39
40
41 /* from ISO/IEC 988:1999 spec */
42 /* 7.18.1.4 Integer types capable of hgolding object pointers */
43 /*
44 * The [u]intptr_t types for the native
45 * integer type, e.g. 32 or 64 or.. whatever
46 * register size the machine has. They are
47 * used for entities that might be either
48 * [unsigned] integers or pointers, and for
49 * type-casting between the two.
50 *
51 * For instance, the IPC system represents
52 * a port in user space as an integer and
53 * in kernel space as a pointer.
54 */
55 type uintptr_t = uint32_t;
56 type intptr_t = int32_t;
57
58 /*
59 * These are the legacy Mach types that are
60 * the [rough] equivalents of the standards above.
61 * They were defined in terms of int, not
62 * long int, so they remain separate.
63 */
64 type register_t = int32_t;
65 type integer_t = int32_t;
66 type natural_t = uint32_t;
67
68 /*
69 * These are the VM types that scale with the address
70 * space size of a given process.
71 */
72 type vm_address_t = natural_t;
73 type vm_offset_t = natural_t;
74 type vm_size_t = natural_t;
75
76 /*
77 * The mach_vm_xxx_t types are sized to hold the
78 * maximum pointer, offset, etc... supported on the
79 * platform.
80 */
81 type mach_vm_address_t = uint32_t;
82 type mach_vm_offset_t = uint32_t;
83 type mach_vm_size_t = uint32_t;
84
85 #if MACH_IPC_COMPAT
86 /*
87 * For the old IPC interface
88 */
89 #define MSG_TYPE_PORT_NAME natural_t
90
91 #endif /* MACH_IPC_COMPAT */
92
93 #endif /* _MACHINE_VM_TYPES_DEFS_ */