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