xref: /xnu-11417.121.6/osfmk/man/host_get_clock_control.html (revision a1e26a70f38d1d7daa7b49b258e2f8538ad81650)
1*a1e26a70SApple OSS Distributions<h2>host_get_clock_control</h2>
2*a1e26a70SApple OSS Distributions<hr>
3*a1e26a70SApple OSS Distributions<p>
4*a1e26a70SApple OSS Distributions<strong>Function</strong> - Return a send right to a kernel clock's control port.
5*a1e26a70SApple OSS Distributions<h3>SYNOPSIS</h3>
6*a1e26a70SApple OSS Distributions<pre>
7*a1e26a70SApple OSS Distributions<strong>kern_return_t   host_get_clock_control</strong>
8*a1e26a70SApple OSS Distributions                <strong>(host_priv_t</strong>                          <var>host_priv</var>,
9*a1e26a70SApple OSS Distributions                 <strong>clock_id_t</strong>                                  <var>id</var>,
10*a1e26a70SApple OSS Distributions                 <strong>clock_ctrl_t</strong>                     <var>clock_control</var><strong>);</strong>
11*a1e26a70SApple OSS Distributions</pre>
12*a1e26a70SApple OSS Distributions<h3>PARAMETERS</h3>
13*a1e26a70SApple OSS Distributions<dl>
14*a1e26a70SApple OSS Distributions<p>
15*a1e26a70SApple OSS Distributions<dt> <var>host_priv</var>
16*a1e26a70SApple OSS Distributions<dd>
17*a1e26a70SApple OSS Distributions[in host-control send right]
18*a1e26a70SApple OSS DistributionsThe control port for the host owning the
19*a1e26a70SApple OSS Distributionsclock.
20*a1e26a70SApple OSS Distributions<p>
21*a1e26a70SApple OSS Distributions<dt> <var>id</var>
22*a1e26a70SApple OSS Distributions<dd>
23*a1e26a70SApple OSS Distributions[in scalar]
24*a1e26a70SApple OSS DistributionsThe identification of the desired kernel clock.  These values
25*a1e26a70SApple OSS Distributionsare defined in \*L<mach/clock_types.h>\*O.  Although an implementation
26*a1e26a70SApple OSS Distributionsmay define additional values, the following values are always defined
27*a1e26a70SApple OSS Distributions(although only the REALTIME clock is required to be implemented):
28*a1e26a70SApple OSS Distributions<dl>
29*a1e26a70SApple OSS Distributions<p>
30*a1e26a70SApple OSS Distributions<dt> <strong>REALTIME_CLOCK</strong>
31*a1e26a70SApple OSS Distributions<dd>
32*a1e26a70SApple OSS DistributionsA moderate resolution clock service that (typically) tracks
33*a1e26a70SApple OSS Distributionstime since the system last boot.
34*a1e26a70SApple OSS Distributions<p>
35*a1e26a70SApple OSS Distributions<dt> <strong>BATTERY_CLOCK</strong>
36*a1e26a70SApple OSS Distributions<dd>
37*a1e26a70SApple OSS DistributionsA (typically) low resolution clock (to the second) that
38*a1e26a70SApple OSS Distributionssurvives power failures or service outages.
39*a1e26a70SApple OSS Distributions<p>
40*a1e26a70SApple OSS Distributions<dt> <strong>HIGHRES_CLOCK</strong>
41*a1e26a70SApple OSS Distributions<dd>
42*a1e26a70SApple OSS DistributionsA high resolution clock.
43*a1e26a70SApple OSS Distributions</dl>
44*a1e26a70SApple OSS Distributions<p>
45*a1e26a70SApple OSS Distributions<dt> <var>clock_control</var>
46*a1e26a70SApple OSS Distributions<dd>
47*a1e26a70SApple OSS Distributions[out clock-control send right]
48*a1e26a70SApple OSS DistributionsControl port for the clock.
49*a1e26a70SApple OSS Distributions</dl>
50*a1e26a70SApple OSS Distributions<h3>DESCRIPTION</h3>
51*a1e26a70SApple OSS Distributions<p>
52*a1e26a70SApple OSS DistributionsThe <strong>host_get_clock_control</strong> function returns a send
53*a1e26a70SApple OSS Distributionsright to the control port for
54*a1e26a70SApple OSS Distributionsa kernel clock object.  This right is used to set the clock's
55*a1e26a70SApple OSS Distributionsresolution and time.
56*a1e26a70SApple OSS Distributions<h3>RETURN VALUES</h3>
57*a1e26a70SApple OSS Distributions<p>
58*a1e26a70SApple OSS DistributionsOnly generic errors apply.
59*a1e26a70SApple OSS Distributions<h3>RELATED INFORMATION</h3>
60*a1e26a70SApple OSS Distributions<p>
61*a1e26a70SApple OSS DistributionsFunctions:
62*a1e26a70SApple OSS Distributions<a href="clock_set_time.html"><strong>clock_set_time</strong></a>,
63*a1e26a70SApple OSS Distributions<a href="clock_set_attributes.html"><strong>clock_set_attributes</strong></a>,
64*a1e26a70SApple OSS Distributions<a href="host_get_clock_service.html"><strong>host_get_clock_service</strong></a>.
65