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