xref: /xnu-8019.80.24/osfmk/man/clock_map_time.html (revision a325d9c4a84054e40bbe985afedcb50ab80993ea)
1*a325d9c4SApple OSS Distributions<h2>clock_map_time</h2>
2*a325d9c4SApple OSS Distributions<hr>
3*a325d9c4SApple OSS Distributions<p>
4*a325d9c4SApple OSS Distributions<strong>Function</strong> - Return a memory object that maps a clock.
5*a325d9c4SApple OSS Distributions<h3>SYNOPSIS</h3>
6*a325d9c4SApple OSS Distributions<pre>
7*a325d9c4SApple OSS Distributions<strong>kern_return_t   clock_map_time</strong>
8*a325d9c4SApple OSS Distributions                <strong>(clock_t</strong>                             <var>clock_name</var>,
9*a325d9c4SApple OSS Distributions                 <strong>memory_object_t</strong>                   <var>clock_memory</var><strong>);</strong>
10*a325d9c4SApple OSS Distributions</pre>
11*a325d9c4SApple OSS Distributions<h3>PARAMETERS</h3>
12*a325d9c4SApple OSS Distributions<dl>
13*a325d9c4SApple OSS Distributions<p>
14*a325d9c4SApple OSS Distributions<dt> <var>clock_name</var>
15*a325d9c4SApple OSS Distributions<dd>
16*a325d9c4SApple OSS Distributions[in clock-name send right]
17*a325d9c4SApple OSS DistributionsThe name (or control) port for the clock.
18*a325d9c4SApple OSS Distributions<p>
19*a325d9c4SApple OSS Distributions<dt> <var>clock_memory</var>
20*a325d9c4SApple OSS Distributions<dd>
21*a325d9c4SApple OSS Distributions[out memory-object-representative send right]
22*a325d9c4SApple OSS DistributionsMapped clock time
23*a325d9c4SApple OSS Distributionsmemory object representative.
24*a325d9c4SApple OSS Distributions</dl>
25*a325d9c4SApple OSS Distributions<h3>DESCRIPTION</h3>
26*a325d9c4SApple OSS Distributions<p>
27*a325d9c4SApple OSS DistributionsThe <strong>clock_map_time</strong> function returns a memory object representative port
28*a325d9c4SApple OSS Distributionsrepresenting read access to a memory object that contains (at offset zero) a
29*a325d9c4SApple OSS Distributionsmapped version of the clock time (structure <strong>mapped_tvalspec</strong>).
30*a325d9c4SApple OSS DistributionsThe returned right is suitable as an argument for <strong>vm_map</strong>.
31*a325d9c4SApple OSS Distributions<h3>NOTES</h3>
32*a325d9c4SApple OSS Distributions<p>
33*a325d9c4SApple OSS DistributionsNot all clocks provide this service, but the REALTIME clock must.
34*a325d9c4SApple OSS Distributions<h3>RETURN VALUES</h3>
35*a325d9c4SApple OSS Distributions<dl>
36*a325d9c4SApple OSS Distributions<p>
37*a325d9c4SApple OSS Distributions<dt> <strong>KERN_FAILURE</strong>
38*a325d9c4SApple OSS Distributions<dd>
39*a325d9c4SApple OSS DistributionsThe specified clock does not provide this service.
40*a325d9c4SApple OSS Distributions</dl>
41*a325d9c4SApple OSS Distributions<h3>RELATED INFORMATION</h3>
42*a325d9c4SApple OSS Distributions<p>
43*a325d9c4SApple OSS DistributionsFunctions:
44*a325d9c4SApple OSS Distributions<a href="host_get_clock_service.html"><strong>host_get_clock_service</strong></a>,
45*a325d9c4SApple OSS Distributions<a href="clock_get_attributes.html"><strong>clock_get_attributes</strong></a>,
46*a325d9c4SApple OSS Distributions<a href="clock_get_time.html"><strong>clock_get_time</strong></a>,
47*a325d9c4SApple OSS Distributions<a href="clock_sleep.html"><strong>clock_sleep</strong></a>,
48*a325d9c4SApple OSS Distributions<a href="clock_alarm.html"><strong>clock_alarm</strong></a>.
49*a325d9c4SApple OSS Distributions<p>
50*a325d9c4SApple OSS DistributionsData Structures:
51*a325d9c4SApple OSS Distributions<a href="mapped_tvalspec.html"><strong>mapped_tvalspec</strong></a>.
52