]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/MO_supply_completed.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / MO_supply_completed.html
1 <h2>memory_object_supply_completed</h2>
2 <hr>
3 <p>
4 <strong>Server Interface</strong> - Return results associated with the kernel's handling of a particular memory manager request.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t memory_object_supply_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>,
12 <strong>kern_return_t</strong> <var>result</var>,
13 <strong>vm_offset_t</strong> <var>error_offset</var><strong>);</strong>
14
15
16 <strong>kern_return_t seqnos_memory_object_supply_completed</strong>
17 <strong>(memory_object_t</strong> <var>reply_port</var>,
18 <strong>mach_port_seqno_t</strong> <var>seqno</var>,
19 <strong>memory_object_control_t</strong> <var>memory_control</var>,
20 <strong>vm_offset_t</strong> <var>offset</var>,
21 <strong>vm_size_t</strong> <var>length</var>,
22 <strong>kern_return_t</strong> <var>result</var>,
23 <strong>vm_offset_t</strong> <var>error_offset</var><strong>);</strong>
24 </pre>
25 <h3>PARAMETERS</h3>
26 <dl>
27 <p>
28 <dt> <var>reply_port</var>
29 <dd>
30 [in reply (receive) right]
31 The port supplied in the corresponding
32 <strong>memory_object_data_supply</strong> call.
33 <p>
34 <dt> <var>seqno</var>
35 <dd>
36 [in scalar]
37 The sequence number of this message relative to the port
38 named in the <strong>memory_object_data_supply</strong> call.
39 <p>
40 <dt> <var>memory_control</var>
41 <dd>
42 [in memory-cache-control send right]
43 The memory cache control port
44 to be used for a response by the memory manager. If the memory
45 object has been supplied to more than one kernel, this parameter
46 identifies the kernel that is making the call.
47 <p>
48 <dt> <var>offset</var>
49 <dd>
50 [in scalar]
51 The offset within the memory object from the corresponding
52 data supply call.
53 <p>
54 <dt> <var>length</var>
55 <dd>
56 [in scalar]
57 The number of bytes accepted. The number converts to an
58 integral number of memory object pages.
59 <p>
60 <dt> <var>result</var>
61 <dd>
62 [in scalar]
63 A kernel return code indicating the result of the supply
64 operation, possibly <strong>KERN_SUCCESS</strong>. <strong>KERN_MEMORY_PRESENT</strong> is
65 currently the only error returned; other errors (invalid arguments, for
66 example) abort the data supply operation.
67 <p>
68 <dt> <var>error_offset</var>
69 <dd>
70 [in scalar]
71 The offset within the memory object where the first error
72 occurred.
73 </dl>
74 <h3>DESCRIPTION</h3>
75 <p>
76 A <strong>memory_object_supply_completed</strong> function is called
77 as the result of a
78 kernel message confirming the kernel's action in response to a
79 <strong>memory_object_data_supply</strong> call from the memory manager.
80 <p>
81 When the kernel accepts the pages, it calls
82 <strong>memory_object_supply_completed</strong>
83 (asynchronously) using the port explicitly provided in the
84 <strong>memory_object_data_supply</strong> call. Because the data supply
85 call can provide multiple pages, not
86 all of which the kernel may necessarily accept and some of which the kernel
87 may have to return to the manager (if precious), the kernel provides this
88 response. If the kernel does not accept all of the pages in
89 the data supply message,
90 it will indicate so in the completion response. If the pages not accepted are
91 precious, they will be returned (in <strong>memory_object_data_return</strong>
92 messages) before
93 it sends this completion message. The completion call includes the offset and
94 length values from the supply request to distinguish it from other supply
95 requests.
96 <h3>RETURN VALUES</h3>
97 <p>
98 Only generic errors apply.
99 <h3>RELATED INFORMATION</h3>
100 <p>
101 Functions:
102 <a href="memory_object_data_supply.html"><strong>memory_object_data_supply</strong></a>,
103 <a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
104 <a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.