]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/memory_object_synchronize.html
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / man / memory_object_synchronize.html
1 <h2>memory_object_synchronize</h2>
2 <hr>
3 <p>
4 <strong>Server Interface</strong> - Forward a client's request to synchronize data with its image in backing store.
5 <h3>SYNOPSIS</h3>
6 <pre>
7 <strong>kern_return_t memory_object_synchronize</strong>
8 <strong>(memory_object_t</strong> <var>memory_object</var>,
9 <strong>memory_object_control_t</strong> <var>memory_control</var>,
10 <strong>vm_offset_t</strong> <var>offset</var>,
11 <strong>vm_offset_t</strong> <var>length</var>,
12 <strong>memory_object</strong> <var>sync_flags</var><strong>);</strong>
13
14
15 <strong>kern_return_t seqnos_memory_object_synchronize</strong>
16 <strong>(memory_object_t</strong> <var>memory_object</var>,
17 <strong>mach_port_seqno_t</strong> <var>seqno</var>,
18 <strong>memory_object_control_t</strong> <var>memory_control</var>,
19 <strong>vm_offset_t</strong> <var>offset</var>,
20 <strong>vm_offset_t</strong> <var>length</var>,
21 <strong>memory_object</strong> <var>sync_flags</var><strong>);</strong>
22 </pre>
23 <h3>PARAMETERS</h3>
24 <dl>
25 <p>
26 <dt> <var>memory_object</var>
27 <dd>
28 [in abstract-memory-object (receive) right]
29 The abstract memory
30 object port that represents the memory object data.
31 <p>
32 <dt> <var>seqno</var>
33 <dd>
34 [in scalar]
35 The sequence number of this message relative to the abstract
36 memory object port.
37 <p>
38 <dt> <var>memory_control</var>
39 <dd>
40 [in memory-cache-control send right]
41 The memory cache control port
42 to be used for a response by the memory manager. If the memory
43 object has been supplied to more than one kernel, this parameter
44 identifies the kernel that is making the call.
45 <p>
46 <dt> <var>offset</var>
47 <dd>
48 [in scalar]
49 The offset within the memory object.
50 <p>
51 <dt> <var>length</var>
52 <dd>
53 [in scalar]
54 The number of bytes cleaned or flushed, starting at <var>offset</var>.
55 The number converts to an integral number of virtual pages.
56 <p>
57 <dt> <var>sync_flags</var>
58 <dd>
59 [in scalar]
60 The bit-wise OR of flags affecting the synchronization.
61 <dl>
62 <p>
63 <dt> <strong>VM_SYNC_INVALIDATE</strong>
64 <dd>
65 Flushes pages in the range. Only precious pages are returned
66 to the memory manager.
67 <p>
68 <dt> <strong>VM_SYNC_SYNCHRONOUS</strong>
69 <dd>
70 Writes dirty and precious pages back to the memory manager,
71 waits for pages to reach backing storage.
72 <p>
73 <dt> <strong>VM_SYNC_ASYNCHRONOUS</strong>
74 <dd>
75 Writes dirty and precious pages back to the memory manager,
76 returns without waiting for pages to reach backing storage.
77 </dl>
78 </dl>
79 <h3>DESCRIPTION</h3>
80 <p>
81 A <strong>memory_object_synchronize</strong> function is called as the
82 result of a kernel
83 message indicating that a client wishes to synchronize the contents
84 of a range of a
85 memory object with its backing storage image. This message would have been
86 preceded by <strong>memory_object_data_return</strong> messages cleaning
87 or flushing the
88 specified range.
89 <p>
90 Depending on the client's supplied <var>sync_flags</var>, the manager waits
91 for the pages
92 to reach the desired state and then replies with
93 <strong>memory_object_synchronize_completed</strong> at which time the
94 client returns from its <strong>vm_msync</strong> call. Multiple
95 synchronize requests may be outstanding at a time but they will not overlap.
96 <h3>RETURN VALUES</h3>
97 <p>
98 Only generic errors apply.
99 <h3>RELATED INFORMATION</h3>
100 <p>
101 Functions:
102 <a href="vm_msync.html"><strong>vm_msync</strong></a>,
103 <a href="MO_SY_completed.html"><strong>memory_object_synchronize_completed</strong></a>,
104 <a href="memory_object_data_return.html"><strong>memory_object_data_return</strong></a>,
105 <a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
106 <a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.