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