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