2 * Copyright (c) 2002,2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
29 #ifndef MACH_VM_TYPES_H_
30 #define MACH_VM_TYPES_H_
33 #include <sys/appleapiopts.h>
35 #include <mach/port.h>
36 #include <mach/machine/vm_types.h>
38 typedef vm_offset_t pointer_t
;
39 typedef vm_offset_t vm_address_t
;
40 typedef uint64_t vm_object_offset_t
;
44 #if !defined(__APPLE_API_PRIVATE) || !defined(MACH_KERNEL_PRIVATE)
47 * Use specifically typed null structures for these in
48 * other parts of the kernel to enable compiler warnings
49 * about type mismatches, etc... Otherwise, these would
55 #endif /* !__APPLE_API_PRIVATE || !MACH_KERNEL_PRIVATE */
57 typedef struct vm_map
*vm_map_t
;
58 typedef struct vm_object
*vm_object_t
;
59 #define VM_OBJECT_NULL ((vm_object_t) 0)
61 #else /* KERNEL_PRIVATE */
63 typedef mach_port_t vm_map_t
;
65 #endif /* KERNEL_PRIVATE */
67 #define VM_MAP_NULL ((vm_map_t) 0)
70 #ifdef __APPLE_API_EVOLVING
74 #ifndef MACH_KERNEL_PRIVATE
77 struct vm_named_entry
;
78 #endif /* !MACH_KERNEL_PRIVATE */
80 typedef struct upl
*upl_t
;
81 typedef struct vm_map_copy
*vm_map_copy_t
;
82 typedef struct vm_named_entry
*vm_named_entry_t
;
84 #define VM_MAP_COPY_NULL ((vm_map_copy_t) 0)
86 #else /* !KERNEL_PRIVATE */
88 typedef mach_port_t upl_t
;
89 typedef mach_port_t vm_named_entry_t
;
91 #endif /* !KERNEL_PRIVATE */
93 #define UPL_NULL ((upl_t) 0)
94 #define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0)
96 #endif /* __APPLE_API_EVOLVING */
98 #endif /* MACH_VM_TYPES_H_ */