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