2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
28 * Header file for basic, machine-dependent data types.
31 #ifndef _PPC_VM_TYPES_DEFS_
32 #define _PPC_VM_TYPES_DEFS_
36 type unsigned = uint32_t;
38 type float = MACH_MSG_TYPE_REAL_32;
39 type double = MACH_MSG_TYPE_REAL_64;
41 /* from ISO/IEC 988:1999 spec */
42 /* 7.18.1.4 Integer types capable of holding object pointers */
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.
51 * For instance, the IPC system represents
52 * a port in user space as an integer and
53 * in kernel space as a pointer.
55 #if defined(__ppc64__)
56 type uintptr_t = uint64_t;
57 type intptr_t = int64_t;
59 type uintptr_t = uint32_t;
60 type intptr_t = int32_t;
64 * These are the legacy Mach types that are
65 * the [rough] equivalents of the standards above.
66 * They were defined in terms of int, not
67 * long int, so they remain separate.
69 #if defined(__ppc64__)
70 type register_t = int64_t;
72 type register_t = int32_t;
74 type integer_t = int32_t;
75 type natural_t = uint32_t;
78 * These are the VM types that scale with the address
79 * space size of a given process.
82 #if defined(__ppc64__)
83 type vm_address_t = uint64_t;
84 type vm_offset_t = uint64_t;
85 type vm_size_t = uint64_t;
87 type vm_address_t = natural_t;
88 type vm_offset_t = natural_t;
89 type vm_size_t = natural_t;
93 * The mach_vm_xxx_t types are sized to hold the
94 * maximum pointer, offset, etc... supported on the
97 type mach_vm_address_t = uint64_t;
98 type mach_vm_offset_t = uint64_t;
99 type mach_vm_size_t = uint64_t;
103 * For the old IPC interface
105 #define MSG_TYPE_PORT_NAME uint32_t
107 #endif /* MACH_IPC_COMPAT */
109 #endif /* _PPC_VM_TYPES_DEFS_ */