<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><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.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch01s04.html" title="High-resolution timers" /><link rel="prev" href="re79.html" title="ktime_equal" /><link rel="next" href="re81.html" title="struct hrtimer_sleeper" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct hrtimer</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re79.html">Prev</a> </td><th width="60%" align="center">High-resolution timers</th><td width="20%" align="right"> <a accesskey="n" href="re81.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct hrtimer"><a id="API-struct-hrtimer"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct hrtimer — the basic hrtimer structure </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting"> struct hrtimer { struct rb_node node; ktime_t _expires; ktime_t _softexpires; enum hrtimer_restart (* function) (struct hrtimer *); struct hrtimer_clock_base * base; unsigned long state; #ifdef CONFIG_TIMER_STATS int start_pid; void * start_site; char start_comm[16]; #endif }; </pre></div><div class="refsect1" title="Members"><a id="id2604305"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">node</span></dt><dd><p> red black tree node for time ordered insertion </p></dd><dt><span class="term">_expires</span></dt><dd><p> the absolute expiry time in the hrtimers internal representation. The time is related to the clock on which the timer is based. Is setup by adding slack to the _softexpires value. For non range timers identical to _softexpires. </p></dd><dt><span class="term">_softexpires</span></dt><dd><p> the absolute earliest expiry time of the hrtimer. The time which was given as expiry time when the timer was armed. </p></dd><dt><span class="term">function</span></dt><dd><p> timer expiry callback function </p></dd><dt><span class="term">base</span></dt><dd><p> pointer to the timer base (per cpu and per clock) </p></dd><dt><span class="term">state</span></dt><dd><p> state information (See bit values above) </p></dd><dt><span class="term">start_pid</span></dt><dd><p> timer statistics field to store the pid of the task which started the timer </p></dd><dt><span class="term">start_site</span></dt><dd><p> timer statistics field to store the site where the timer was started </p></dd><dt><span class="term">start_comm[16]</span></dt><dd><p> timer statistics field to store the name of the process which started the timer </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2604425"></a><h2>Description</h2><p> The hrtimer structure must be initialized by <code class="function">hrtimer_init</code> </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re79.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s04.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re81.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>ktime_equal</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>struct hrtimer_sleeper</span></td></tr></table></div></body></html>