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. i386 version.
30 #ifndef _MACHINE_VM_TYPES_DEFS_
31 #define _MACHINE_VM_TYPES_DEFS_ 1
35 type unsigned = uint32_t;
37 type float = MACH_MSG_TYPE_REAL_32;
38 type double = MACH_MSG_TYPE_REAL_64;
41 /* from ISO/IEC 988:1999 spec */
42 /* 7.18.1.4 Integer types capable of hgolding 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 type uintptr_t = uint32_t;
56 type intptr_t = int32_t;
59 * These are the legacy Mach types that are
60 * the [rough] equivalents of the standards above.
61 * They were defined in terms of int, not
62 * long int, so they remain separate.
64 type register_t = int32_t;
65 type integer_t = int32_t;
66 type natural_t = uint32_t;
69 * These are the VM types that scale with the address
70 * space size of a given process.
72 type vm_address_t = natural_t;
73 type vm_offset_t = natural_t;
74 type vm_size_t = natural_t;
77 * The mach_vm_xxx_t types are sized to hold the
78 * maximum pointer, offset, etc... supported on the
81 type mach_vm_address_t = uint32_t;
82 type mach_vm_offset_t = uint32_t;
83 type mach_vm_size_t = uint32_t;
87 * For the old IPC interface
89 #define MSG_TYPE_PORT_NAME natural_t
91 #endif /* MACH_IPC_COMPAT */
93 #endif /* _MACHINE_VM_TYPES_DEFS_ */