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. i386 version.
31 #ifndef _MACHINE_VM_TYPES_DEFS_
32 #define _MACHINE_VM_TYPES_DEFS_ 1
36 type unsigned = uint32_t;
38 type float = MACH_MSG_TYPE_REAL_32;
39 type double = MACH_MSG_TYPE_REAL_64;
42 /* from ISO/IEC 988:1999 spec */
43 /* 7.18.1.4 Integer types capable of hgolding object pointers */
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.
52 * For instance, the IPC system represents
53 * a port in user space as an integer and
54 * in kernel space as a pointer.
56 type uintptr_t = uint32_t;
57 type intptr_t = int32_t;
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.
65 type register_t = int32_t;
66 type integer_t = int32_t;
67 type natural_t = uint32_t;
70 * These are the VM types that scale with the address
71 * space size of a given process.
73 type vm_address_t = natural_t;
74 type vm_offset_t = natural_t;
75 type vm_size_t = natural_t;
78 * The mach_vm_xxx_t types are sized to hold the
79 * maximum pointer, offset, etc... supported on the
82 type mach_vm_address_t = uint32_t;
83 type mach_vm_offset_t = uint32_t;
84 type mach_vm_size_t = uint32_t;
88 * For the old IPC interface
90 #define MSG_TYPE_PORT_NAME natural_t
92 #endif /* MACH_IPC_COMPAT */
94 #endif /* _MACHINE_VM_TYPES_DEFS_ */