1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct hrtimer</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch01s05.html" title="High-resolution timers"><link rel="prev" href="API-ktime-to-timespec64-cond.html" title="ktime_to_timespec64_cond"><link rel="next" href="API-struct-hrtimer-sleeper.html" title="struct hrtimer_sleeper"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct hrtimer</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-ktime-to-timespec64-cond.html">Prev</a> </td><th width="60%" align="center">High-resolution timers</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-hrtimer-sleeper.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-hrtimer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct hrtimer — 
2  the basic hrtimer structure
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct hrtimer {
5  struct timerqueue_node node;
6  ktime_t _softexpires;
7  enum hrtimer_restart		(* function) (struct hrtimer *);
8  struct hrtimer_clock_base * base;
9  u8 state;
10  u8 is_rel;
11#ifdef CONFIG_TIMER_STATS
12  int start_pid;
13  void * start_site;
14  char start_comm[16];
15#endif
16};  </pre></div><div class="refsect1"><a name="id-1.3.6.9.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">node</span></dt><dd><p>
17timerqueue node, which also manages node.expires,
18the absolute expiry time in the hrtimers internal
19representation. The time is related to the clock on
20which the timer is based. Is setup by adding
21slack to the _softexpires value. For non range timers
22identical to _softexpires.
23      </p></dd><dt><span class="term">_softexpires</span></dt><dd><p>
24the absolute earliest expiry time of the hrtimer.
25The time which was given as expiry time when the timer
26was armed.
27      </p></dd><dt><span class="term">function</span></dt><dd><p>
28timer expiry callback function
29      </p></dd><dt><span class="term">base</span></dt><dd><p>
30pointer to the timer base (per cpu and per clock)
31      </p></dd><dt><span class="term">state</span></dt><dd><p>
32state information (See bit values above)
33      </p></dd><dt><span class="term">is_rel</span></dt><dd><p>
34Set if the timer was armed relative
35      </p></dd><dt><span class="term">start_pid</span></dt><dd><p>
36timer statistics field to store the pid of the task which
37started the timer
38      </p></dd><dt><span class="term">start_site</span></dt><dd><p>
39timer statistics field to store the site where the timer
40was started
41      </p></dd><dt><span class="term">start_comm[16]</span></dt><dd><p>
42timer statistics field to store the name of the process which
43started the timer
44      </p></dd></dl></div></div><div class="refsect1"><a name="id-1.3.6.9.6"></a><h2>Description</h2><p>
45   The hrtimer structure must be initialized by <code class="function"><a class="link" href="API-hrtimer-init.html" title="hrtimer_init">hrtimer_init</a></code>
46</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-ktime-to-timespec64-cond.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s05.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-hrtimer-sleeper.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">ktime_to_timespec64_cond</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct hrtimer_sleeper</span></td></tr></table></div></body></html>
47