2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
27 * Header file for basic, machine-dependent data types.
30 #ifndef _PPC_VM_TYPES_DEFS_
31 #define _PPC_VM_TYPES_DEFS_
35 type unsigned = uint32_t;
37 type float = MACH_MSG_TYPE_REAL_32;
38 type double = MACH_MSG_TYPE_REAL_64;
40 /* from ISO/IEC 988:1999 spec */
41 /* 7.18.1.4 Integer types capable of holding object pointers */
43 * The [u]intptr_t types for the native
44 * integer type, e.g. 32 or 64 or.. whatever
45 * register size the machine has. They are
46 * used for entities that might be either
47 * [unsigned] integers or pointers, and for
48 * type-casting between the two.
50 * For instance, the IPC system represents
51 * a port in user space as an integer and
52 * in kernel space as a pointer.
54 #if defined(__ppc64__)
55 type uintptr_t = uint64_t;
56 type intptr_t = int64_t;
58 type uintptr_t = uint32_t;
59 type intptr_t = int32_t;
63 * These are the legacy Mach types that are
64 * the [rough] equivalents of the standards above.
65 * They were defined in terms of int, not
66 * long int, so they remain separate.
68 #if defined(__ppc64__)
69 type register_t = int64_t;
71 type register_t = int32_t;
73 type integer_t = int32_t;
74 type natural_t = uint32_t;
77 * These are the VM types that scale with the address
78 * space size of a given process.
81 #if defined(__ppc64__)
82 type vm_address_t = uint64_t;
83 type vm_offset_t = uint64_t;
84 type vm_size_t = uint64_t;
86 type vm_address_t = natural_t;
87 type vm_offset_t = natural_t;
88 type vm_size_t = natural_t;
92 * The mach_vm_xxx_t types are sized to hold the
93 * maximum pointer, offset, etc... supported on the
96 type mach_vm_address_t = uint64_t;
97 type mach_vm_offset_t = uint64_t;
98 type mach_vm_size_t = uint64_t;
102 * For the old IPC interface
104 #define MSG_TYPE_PORT_NAME uint32_t
106 #endif /* MACH_IPC_COMPAT */
108 #endif /* _PPC_VM_TYPES_DEFS_ */