2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_OSREFERENCE_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. The rights granted to you under the
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
35 * Header file for basic, machine-dependent data types. i386 version.
38 #ifndef _MACHINE_VM_TYPES_DEFS_
39 #define _MACHINE_VM_TYPES_DEFS_ 1
43 type unsigned = uint32_t;
45 type float = MACH_MSG_TYPE_REAL_32;
46 type double = MACH_MSG_TYPE_REAL_64;
49 /* from ISO/IEC 988:1999 spec */
50 /* 7.18.1.4 Integer types capable of hgolding object pointers */
52 * The [u]intptr_t types for the native
53 * integer type, e.g. 32 or 64 or.. whatever
54 * register size the machine has. They are
55 * used for entities that might be either
56 * [unsigned] integers or pointers, and for
57 * type-casting between the two.
59 * For instance, the IPC system represents
60 * a port in user space as an integer and
61 * in kernel space as a pointer.
63 type uintptr_t = uint32_t;
64 type intptr_t = int32_t;
67 * These are the legacy Mach types that are
68 * the [rough] equivalents of the standards above.
69 * They were defined in terms of int, not
70 * long int, so they remain separate.
72 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.
80 type vm_address_t = natural_t;
81 type vm_offset_t = natural_t;
82 type vm_size_t = natural_t;
85 * The mach_vm_xxx_t types are sized to hold the
86 * maximum pointer, offset, etc... supported on the
89 type mach_vm_address_t = uint32_t;
90 type mach_vm_offset_t = uint32_t;
91 type mach_vm_size_t = uint32_t;
95 * For the old IPC interface
97 #define MSG_TYPE_PORT_NAME natural_t
99 #endif /* MACH_IPC_COMPAT */
101 #endif /* _MACHINE_VM_TYPES_DEFS_ */