xref: /xnu-8796.121.2/osfmk/man/clock_set_attributes.html (revision c54f35ca767986246321eb901baf8f5ff7923f6a)
1*c54f35caSApple OSS Distributions<h2>clock_set_attributes</h2>
2*c54f35caSApple OSS Distributions<hr>
3*c54f35caSApple OSS Distributions<p>
4*c54f35caSApple OSS Distributions<strong>Function</strong> - Set a particular clock's attributes.
5*c54f35caSApple OSS Distributions<h3>SYNOPSIS</h3>
6*c54f35caSApple OSS Distributions<pre>
7*c54f35caSApple OSS Distributions<strong>kern_return_t   clock_set_attributes</strong>
8*c54f35caSApple OSS Distributions                <strong>(clock_ctrl_t</strong>                     <var>clock_control</var>,
9*c54f35caSApple OSS Distributions                 <strong>clock_flavor_t</strong>                          <var>flavor</var>,
10*c54f35caSApple OSS Distributions                 <strong>clock_attr_t</strong>                         <var>attribute</var>,
11*c54f35caSApple OSS Distributions                 <strong>clock_control</strong>                  <var>attribute_count</var><strong>);</strong>
12*c54f35caSApple OSS Distributions</pre>
13*c54f35caSApple OSS Distributions<h3>PARAMETERS</h3>
14*c54f35caSApple OSS Distributions<dl>
15*c54f35caSApple OSS Distributions<p>
16*c54f35caSApple OSS Distributions<dt> <var>clock_control</var>
17*c54f35caSApple OSS Distributions<dd>
18*c54f35caSApple OSS Distributions[in clock-control send right]
19*c54f35caSApple OSS DistributionsThe control port for the clock.
20*c54f35caSApple OSS Distributions<p>
21*c54f35caSApple OSS Distributions<dt> <var>flavor</var>
22*c54f35caSApple OSS Distributions<dd>
23*c54f35caSApple OSS Distributions[in scalar]
24*c54f35caSApple OSS DistributionsType of information to be set.  Defined values are:
25*c54f35caSApple OSS Distributions<dl>
26*c54f35caSApple OSS Distributions<p>
27*c54f35caSApple OSS Distributions<dt> <strong>CLOCK_ALARM_CURRES</strong>
28*c54f35caSApple OSS Distributions<dd>
29*c54f35caSApple OSS DistributionsThe resolution, in nanoseconds, at which clock alarm and
30*c54f35caSApple OSS Distributionssleep timers are currently serviced.  Increasing the current
31*c54f35caSApple OSS Distributionsresolution will have no impact on any pending clock alarms (i.e.
32*c54f35caSApple OSS Distributionsthey will go off as originally scheduled).  Decreasing the
33*c54f35caSApple OSS Distributionscurrent resolution will truncate any pending alarms to the
34*c54f35caSApple OSS Distributionsgranularity of the new current resolution.  This value must be a
35*c54f35caSApple OSS Distributionsmultiple of the minimum resolution and not greater than the
36*c54f35caSApple OSS Distributionsmaximum resolution of the clock.
37*c54f35caSApple OSS Distributions</dl>
38*c54f35caSApple OSS Distributions<p>
39*c54f35caSApple OSS Distributions<dt> <var>attribute</var>
40*c54f35caSApple OSS Distributions<dd>
41*c54f35caSApple OSS Distributions[pointer to in scalar]
42*c54f35caSApple OSS DistributionsNew attribute.
43*c54f35caSApple OSS Distributions<p>
44*c54f35caSApple OSS Distributions<dt> <var>attribute_count</var>
45*c54f35caSApple OSS Distributions<dd>
46*c54f35caSApple OSS Distributions[in scalar]
47*c54f35caSApple OSS DistributionsThe size of the buffer (in natural-sized units).
48*c54f35caSApple OSS Distributions</dl>
49*c54f35caSApple OSS Distributions<h3>DESCRIPTION</h3>
50*c54f35caSApple OSS Distributions<p>
51*c54f35caSApple OSS DistributionsThe <strong>clock_set_attributes</strong> function sets attributes of
52*c54f35caSApple OSS Distributionsa clock's operation.
53*c54f35caSApple OSS Distributions<h3>NOTES</h3>
54*c54f35caSApple OSS Distributions<p>
55*c54f35caSApple OSS DistributionsThe main reason a clock's current resolution would not always equal its
56*c54f35caSApple OSS Distributionsminimum resolution is because the overhead of sustaining the
57*c54f35caSApple OSS Distributionsminimum resolution,
58*c54f35caSApple OSS Distributionswhen it is not needed by any existing alarm service client, may be prohibitive
59*c54f35caSApple OSS Distributionsfor a given hardware platform and underlying clock device.
60*c54f35caSApple OSS Distributions<h3>RETURN VALUES</h3>
61*c54f35caSApple OSS Distributions<p>
62*c54f35caSApple OSS DistributionsOnly generic errors apply.
63*c54f35caSApple OSS Distributions<h3>RELATED INFORMATION</h3>
64*c54f35caSApple OSS Distributions<p>
65*c54f35caSApple OSS DistributionsFunctions:
66*c54f35caSApple OSS Distributions<a href="host_get_clock_control.html"><strong>host_get_clock_control</strong></a>,
67*c54f35caSApple OSS Distributions<a href="clock_set_time.html"><strong>clock_set_time</strong></a>,
68*c54f35caSApple OSS Distributions<a href="clock_get_attributes.html"><strong>clock_get_attributes</strong></a>.
69