2 * Copyright (c) 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 * Mach Operating System
30 * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
31 * All Rights Reserved.
33 * Permission to use, copy, modify and distribute this software and its
34 * documentation is hereby granted, provided that both the copyright
35 * notice and this permission notice appear in all copies of the
36 * software, derivative works or modified versions, and any portions
37 * thereof, and that both notices appear in supporting documentation.
39 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
40 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
41 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
43 * Carnegie Mellon requests users of this software to return to
45 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
46 * School of Computer Science
47 * Carnegie Mellon University
48 * Pittsburgh PA 15213-3890
50 * any improvements or extensions that they make and grant Carnegie Mellon
51 * the rights to redistribute these changes.
56 * File: mach/memory_object_control.defs
59 * Basic Mach external memory management interface declaration.
65 #endif /* KERNEL_USER */
68 #endif /* KERNEL_SERVER */
69 memory_object_control 2000;
72 #include <advisory_pageout.h>
73 #endif /* MACH_KERNEL */
75 #include <mach/std_types.defs>
76 #include <mach/mach_types.defs>
79 * Retrieves the attributes currently associated with
82 routine memory_object_get_attributes(
83 memory_control : memory_object_control_t;
84 flavor : memory_object_flavor_t;
85 out attributes : memory_object_info_t, CountInOut);
88 routine memory_object_change_attributes(
89 memory_control : memory_object_control_t;
90 flavor : memory_object_flavor_t;
91 attributes : memory_object_info_t
94 routine memory_object_synchronize_completed (
95 memory_control : memory_object_control_t;
96 offset : memory_object_offset_t;
97 length : vm_offset_t);
100 * Control use of the data associated with the given
101 * memory object. For each page in the given range,
102 * perform the following operations, in order:
103 * 1) restrict access to the page (disallow
104 * forms specified by "prot");
105 * 2) write back modifications (if "should_return"
106 * is RETURN_DIRTY and the page is dirty, or
107 * "should_return" is RETURN_ALL and the page
108 * is either dirty or precious); and,
109 * 3) flush the cached copy (if "should_flush"
111 * The set of pages is defined by a starting offset
112 * ("offset") and size ("size"). Only pages with the
113 * same page alignment as the starting offset are
116 routine memory_object_lock_request(
117 memory_control : memory_object_control_t;
118 offset : memory_object_offset_t;
119 size : memory_object_size_t;
120 should_return : memory_object_return_t;
122 lock_value : vm_prot_t
128 routine memory_object_destroy(
129 memory_control : memory_object_control_t;
130 reason : kern_return_t);
133 * The pager gets memory_object_data_request and memory_object_data_return
134 * calls to inform it that data within the memory object needs to be
135 * manipulated. Those requests simply identify the range in the memory
136 * object that needs servicing, but not the data itself. The pager
137 * turns around and requests one (or several) Universal Page Lists (UPLs)
138 * from the VM cache object associated with the memory object via one
139 * of the following calls. These UPLs are then committed (or aborted)
140 * in whole (or in ranges) as the processing completes.
143 routine memory_object_upl_request(
144 memory_control : memory_object_control_t;
145 in offset : memory_object_offset_t;
148 out page_list : upl_page_info_array_t, CountInOut;
149 in cntrl_flags : integer_t);
151 routine memory_object_super_upl_request(
152 memory_control : memory_object_control_t;
153 in offset : memory_object_offset_t;
155 in super_size : vm_size_t;
157 out page_list : upl_page_info_array_t, CountInOut;
158 in cntrl_flags : integer_t);
161 * This functions allows a single page to be manipulated with less overhead
162 * than creating a UPL.
164 routine memory_object_page_op(
165 memory_control : memory_object_control_t;
166 in offset : memory_object_offset_t;
168 out phys_entry : uint32_t;
169 out flags : integer_t);
171 routine memory_object_recover_named(
172 memory_control : memory_object_control_t;
173 in wait_on_terminating : boolean_t);
175 routine memory_object_release_name(
176 memory_control : memory_object_control_t;
179 routine memory_object_range_op(
180 memory_control : memory_object_control_t;
181 in offset_beg : memory_object_offset_t;
182 in offset_end : memory_object_offset_t;
184 out range : integer_t);