1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><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>&#160;</td><th width="60%" align="center">High-resolution timers</th><td width="20%" align="right">&#160;<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 &#8212; 
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  unsigned long state;
10#ifdef CONFIG_TIMER_STATS
11  int start_pid;
12  void * start_site;
13  char start_comm[16];
14#endif
15};  </pre></div><div class="refsect1"><a name="idp1107543060"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">node</span></dt><dd><p>
16timerqueue node, which also manages node.expires,
17the absolute expiry time in the hrtimers internal
18representation. The time is related to the clock on
19which the timer is based. Is setup by adding
20slack to the _softexpires value. For non range timers
21identical to _softexpires.
22      </p></dd><dt><span class="term">_softexpires</span></dt><dd><p>
23the absolute earliest expiry time of the hrtimer.
24The time which was given as expiry time when the timer
25was armed.
26      </p></dd><dt><span class="term">function</span></dt><dd><p>
27timer expiry callback function
28      </p></dd><dt><span class="term">base</span></dt><dd><p>
29pointer to the timer base (per cpu and per clock)
30      </p></dd><dt><span class="term">state</span></dt><dd><p>
31state information (See bit values above)
32      </p></dd><dt><span class="term">start_pid</span></dt><dd><p>
33timer statistics field to store the pid of the task which
34started the timer
35      </p></dd><dt><span class="term">start_site</span></dt><dd><p>
36timer statistics field to store the site where the timer
37was started
38      </p></dd><dt><span class="term">start_comm[16]</span></dt><dd><p>
39timer statistics field to store the name of the process which
40started the timer
41      </p></dd></dl></div></div><div class="refsect1"><a name="idp1107549780"></a><h2>Description</h2><p>
42   The hrtimer structure must be initialized by <code class="function">hrtimer_init</code>
43</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>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch01s05.html">Up</a></td><td width="40%" align="right">&#160;<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>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">struct hrtimer_sleeper</span></td></tr></table></div></body></html>
44