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