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