]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/MO_lock_completed.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / MO_lock_completed.html
CommitLineData
13fec989
A
1<h2>memory_object_lock_completed</h2>
2<hr>
3<p>
4<strong>Server Interface</strong> - Report to memory manager that a previous consistency control request has been handled.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t memory_object_lock_completed</strong>
8 <strong>(memory_object_t</strong> <var>reply_port</var>,
9 <strong>memory_object_control_t</strong> <var>memory_control</var>,
10 <strong>vm_offset_t</strong> <var>offset</var>,
11 <strong>vm_size_t</strong> <var>length</var><strong>);</strong>
12
13
14<strong>kern_return_t seqnos_memory_object_lock_completed</strong>
15 <strong>(memory_object_t</strong> <var>reply_port</var>,
16 <strong>mach_port_seqno_t</strong> <var>seqno</var>,
17 <strong>memory_object_control_t</strong> <var>memory_control</var>,
18 <strong>vm_offset_t</strong> <var>offset</var>,
19 <strong>vm_size_t</strong> <var>length</var><strong>);</strong>
20</pre>
21<h3>PARAMETERS</h3>
22<dl>
23<p>
24<dt> <var>reply_port</var>
25<dd>
26[in reply (receive) right]
27The port supplied in the corresponding
28<strong>memory_object_lock_request</strong> call.
29<p>
30<dt> <var>seqno</var>
31<dd>
32[in scalar]
33The sequence number of this message relative to the port
34named in the <strong>memory_object_lock_completed</strong> message.
35<p>
36<dt> <var>memory_control</var>
37<dd>
38[in memory-cache-control send right]
39The memory cache control port
40to be used for a response by the memory manager. If the memory
41object has been supplied to more than one kernel, this parameter
42identifies the kernel that is making the call.
43<p>
44<dt> <var>offset</var>
45<dd>
46[in scalar]
47The offset within the memory object.
48<p>
49<dt> <var>length</var>
50<dd>
51[in scalar]
52The number of bytes to which the call refers, starting at
53<var>offset</var>. The number converts to an integral number of memory object
54pages.
55</dl>
56<h3>DESCRIPTION</h3>
57<p>
58A <strong>memory_object_lock_completed</strong> function is called as
59the result of a kernel
60message confirming the kernel's action in response to a
61<strong>memory_object_lock_request</strong> call from the memory manager.
62The memory manager can use the <strong>memory_object_lock_request</strong> call to:
63<ul>
64<li>
65Alter access restrictions specified in the <strong>memory_object_data_supply</strong>
66call or a previous <strong>memory_object_lock_request</strong> call.
67<p>
68<li>
69Write back modifications made in memory.
70<p>
71<li>
72Invalidate its cached data.
73</ul>
74<p>
75When the kernel completes the requested actions, it calls
76<strong>memory_object_lock_completed</strong> (asynchronously) using
77the port explicitly provided in the
78<strong>memory_object_lock_request</strong> call. Because the memory manager cannot
79know which pages have been modified, or even which pages remain in the
80cache, it cannot know how many pages will be written back in response to a
81<strong>memory_object_lock_request</strong> call. Receiving the
82<strong>memory_object_lock_completed</strong> call is the only sure
83means of detecting completion. The completion call
84includes the offset and length values from the consistency request
85to distinguish
86it from other consistency requests.
87<h3>RETURN VALUES</h3>
88<p>
89Only generic errors apply.
90<h3>RELATED INFORMATION</h3>
91<p>
92Functions:
93<a href="memory_object_lock_request.html"><strong>memory_object_lock_request</strong></a>,
94<a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
95<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.