]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/clock_set_attributes.html
xnu-7195.60.75.tar.gz
[apple/xnu.git] / osfmk / man / clock_set_attributes.html
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]
19 The control port for the clock.
20 <p>
21 <dt> <var>flavor</var>
22 <dd>
23 [in scalar]
24 Type of information to be set. Defined values are:
25 <dl>
26 <p>
27 <dt> <strong>CLOCK_ALARM_CURRES</strong>
28 <dd>
29 The resolution, in nanoseconds, at which clock alarm and
30 sleep timers are currently serviced. Increasing the current
31 resolution will have no impact on any pending clock alarms (i.e.
32 they will go off as originally scheduled). Decreasing the
33 current resolution will truncate any pending alarms to the
34 granularity of the new current resolution. This value must be a
35 multiple of the minimum resolution and not greater than the
36 maximum resolution of the clock.
37 </dl>
38 <p>
39 <dt> <var>attribute</var>
40 <dd>
41 [pointer to in scalar]
42 New attribute.
43 <p>
44 <dt> <var>attribute_count</var>
45 <dd>
46 [in scalar]
47 The size of the buffer (in natural-sized units).
48 </dl>
49 <h3>DESCRIPTION</h3>
50 <p>
51 The <strong>clock_set_attributes</strong> function sets attributes of
52 a clock's operation.
53 <h3>NOTES</h3>
54 <p>
55 The main reason a clock's current resolution would not always equal its
56 minimum resolution is because the overhead of sustaining the
57 minimum resolution,
58 when it is not needed by any existing alarm service client, may be prohibitive
59 for a given hardware platform and underlying clock device.
60 <h3>RETURN VALUES</h3>
61 <p>
62 Only generic errors apply.
63 <h3>RELATED INFORMATION</h3>
64 <p>
65 Functions:
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>.