xref: /xnu-10063.121.3/osfmk/man/memory_object_data_unlock.html (revision 2c2f96dc2b9a4408a43d3150ae9c105355ca3daa)
1*2c2f96dcSApple OSS Distributions<h2>memory_object_data_unlock</h2>
2*2c2f96dcSApple OSS Distributions<hr>
3*2c2f96dcSApple OSS Distributions<p>
4*2c2f96dcSApple OSS Distributions<strong>Server Interface</strong> - Request that the memory manager change current access permission on the specified memory object's data.
5*2c2f96dcSApple OSS Distributions<h3>SYNOPSIS</h3>
6*2c2f96dcSApple OSS Distributions<pre>
7*2c2f96dcSApple OSS Distributions<strong>kern_return_t   memory_object_data_unlock</strong>
8*2c2f96dcSApple OSS Distributions                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
9*2c2f96dcSApple OSS Distributions                 <strong>memory_object_control_t</strong>         <var>memory_control</var>,
10*2c2f96dcSApple OSS Distributions                 <strong>vm_offset_t</strong>                             <var>offset</var>,
11*2c2f96dcSApple OSS Distributions                 <strong>vm_size_t</strong>                               <var>length</var>,
12*2c2f96dcSApple OSS Distributions                 <strong>vm_prot_t</strong>                       <var>desired_access</var><strong>);</strong>
13*2c2f96dcSApple OSS Distributions
14*2c2f96dcSApple OSS Distributions
15*2c2f96dcSApple OSS Distributions<strong>kern_return_t   seqnos_memory_object_data_unlock</strong>
16*2c2f96dcSApple OSS Distributions                <strong>(memory_object_t</strong>                  <var>memory_object</var>,
17*2c2f96dcSApple OSS Distributions                 <strong>mach_port_seqno_t</strong>                        <var>seqno</var>,
18*2c2f96dcSApple OSS Distributions                 <strong>memory_object_control_t</strong>         <var>memory_control</var>,
19*2c2f96dcSApple OSS Distributions                 <strong>vm_offset_t</strong>                             <var>offset</var>,
20*2c2f96dcSApple OSS Distributions                 <strong>vm_size_t</strong>                               <var>length</var>,
21*2c2f96dcSApple OSS Distributions                 <strong>vm_prot_t</strong>                       <var>desired_access</var><strong>);</strong>
22*2c2f96dcSApple OSS Distributions</pre>
23*2c2f96dcSApple OSS Distributions<h3>PARAMETERS</h3>
24*2c2f96dcSApple OSS Distributions<dl>
25*2c2f96dcSApple OSS Distributions<p>
26*2c2f96dcSApple OSS Distributions<dt> <var>memory_object</var>
27*2c2f96dcSApple OSS Distributions<dd>
28*2c2f96dcSApple OSS Distributions[in abstract-memory-object (receive) right]
29*2c2f96dcSApple OSS DistributionsThe abstract memory
30*2c2f96dcSApple OSS Distributionsobject port that represents the memory object data.
31*2c2f96dcSApple OSS Distributions<p>
32*2c2f96dcSApple OSS Distributions<dt> <var>seqno</var>
33*2c2f96dcSApple OSS Distributions<dd>
34*2c2f96dcSApple OSS Distributions[in scalar]
35*2c2f96dcSApple OSS DistributionsThe sequence number of this message relative to the abstract
36*2c2f96dcSApple OSS Distributionsmemory object port.
37*2c2f96dcSApple OSS Distributions<p>
38*2c2f96dcSApple OSS Distributions<dt> <var>memory_control</var>
39*2c2f96dcSApple OSS Distributions<dd>
40*2c2f96dcSApple OSS Distributions[in memory-cache-control send right]
41*2c2f96dcSApple OSS DistributionsThe memory cache control port
42*2c2f96dcSApple OSS Distributionsto be used for a response by the memory manager.  If the memory
43*2c2f96dcSApple OSS Distributionsobject has been supplied to more than one kernel, this parameter
44*2c2f96dcSApple OSS Distributionsidentifies the kernel that is making the call.
45*2c2f96dcSApple OSS Distributions<p>
46*2c2f96dcSApple OSS Distributions<dt> <var>offset</var>
47*2c2f96dcSApple OSS Distributions<dd>
48*2c2f96dcSApple OSS Distributions[in scalar]
49*2c2f96dcSApple OSS DistributionsThe offset within the memory object.
50*2c2f96dcSApple OSS Distributions<p>
51*2c2f96dcSApple OSS Distributions<dt> <var>length</var>
52*2c2f96dcSApple OSS Distributions<dd>
53*2c2f96dcSApple OSS Distributions[in scalar]
54*2c2f96dcSApple OSS DistributionsThe number of bytes to which the access applies, starting at
55*2c2f96dcSApple OSS Distributions<var>offset</var>.  The number converts to an integral number of memory object
56*2c2f96dcSApple OSS Distributionspages.
57*2c2f96dcSApple OSS Distributions<p>
58*2c2f96dcSApple OSS Distributions<dt> <var>desired_access</var>
59*2c2f96dcSApple OSS Distributions<dd>
60*2c2f96dcSApple OSS Distributions[in scalar]
61*2c2f96dcSApple OSS DistributionsThe memory access modes requested for the cached data.
62*2c2f96dcSApple OSS DistributionsPossible values are obtained by or'ing together the following values:
63*2c2f96dcSApple OSS Distributions<dl>
64*2c2f96dcSApple OSS Distributions<p>
65*2c2f96dcSApple OSS Distributions<dt> <strong>VM_PROT_READ</strong>
66*2c2f96dcSApple OSS Distributions<dd>
67*2c2f96dcSApple OSS DistributionsAllows read access.
68*2c2f96dcSApple OSS Distributions<p>
69*2c2f96dcSApple OSS Distributions<dt> <strong>VM_PROT_WRITE</strong>
70*2c2f96dcSApple OSS Distributions<dd>
71*2c2f96dcSApple OSS DistributionsAllows write access.
72*2c2f96dcSApple OSS Distributions<p>
73*2c2f96dcSApple OSS Distributions<dt> <strong>VM_PROT_EXECUTE</strong>
74*2c2f96dcSApple OSS Distributions<dd>
75*2c2f96dcSApple OSS DistributionsAllows execute access.
76*2c2f96dcSApple OSS Distributions</dl>
77*2c2f96dcSApple OSS Distributions</dl>
78*2c2f96dcSApple OSS Distributions<h3>DESCRIPTION</h3>
79*2c2f96dcSApple OSS Distributions<p>
80*2c2f96dcSApple OSS DistributionsA <strong>memory_object_data_unlock</strong> function is called as the
81*2c2f96dcSApple OSS Distributionsresult of a kernel
82*2c2f96dcSApple OSS Distributionsmessage requesting the memory manager to permit at least the
83*2c2f96dcSApple OSS Distributionsdesired access to the
84*2c2f96dcSApple OSS Distributionsspecified data cached by the kernel.  The memory manager is expected
85*2c2f96dcSApple OSS Distributionsto use the
86*2c2f96dcSApple OSS Distributions<strong>memory_object_lock_request</strong> call in response.
87*2c2f96dcSApple OSS Distributions<h3>RETURN VALUES</h3>
88*2c2f96dcSApple OSS Distributions<p>
89*2c2f96dcSApple OSS DistributionsOnly generic errors apply.
90*2c2f96dcSApple OSS Distributions<h3>RELATED INFORMATION</h3>
91*2c2f96dcSApple OSS Distributions<p>
92*2c2f96dcSApple OSS DistributionsFunctions:
93*2c2f96dcSApple OSS Distributions<a href="MO_lock_completed.html"><strong>memory_object_lock_completed</strong></a>,
94*2c2f96dcSApple OSS Distributions<a href="memory_object_lock_request.html"><strong>memory_object_lock_request</strong></a>,
95*2c2f96dcSApple OSS Distributions<a href="memory_object_server.html"><strong>memory_object_server</strong></a>,
96*2c2f96dcSApple OSS Distributions<a href="SMO_server.html"><strong>seqnos_memory_object_server</strong></a>.
97