File: group__native__timer.html

package info (click to toggle)
xenomai 2.5.4-3squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 36,140 kB
  • ctags: 35,509
  • sloc: ansic: 109,084; sh: 11,745; makefile: 2,205; xml: 1,356; asm: 613; php: 316; perl: 155
file content (439 lines) | stat: -rw-r--r-- 22,992 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xenomai API: Timer management services.</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Timer management services.<br>
<small>
[<a class="el" href="group__native.html">Native Xenomai API.</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Timer management services.:</div>
<div class="dynsection">
<center><table><tr><td><img src="group__native__timer.png" border="0" alt="" usemap="#group____native____timer_map">
<map name="group____native____timer_map">
<area shape="rect" href="group__native.html" title="Native Xenomai API." alt="" coords="5,5,157,32"></map></td></tr></table></center>
</div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Timer-related services allow to control the Xenomai system timer which is used in all timed operations. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2native_2timer_8h.html">timer.h</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This file is part of the Xenomai project. <br></td></tr>

<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ksrc_2skins_2native_2timer_8c.html">timer.c</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This file is part of the Xenomai project. <br></td></tr>

<p>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structrt__timer__info.html">rt_timer_info</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure containing timer-information useful to users.  <a href="structrt__timer__info.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="structrt__timer__info.html">rt_timer_info</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#g36af8698cba5da05f9dca2d644c1a6df">RT_TIMER_INFO</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure containing timer-information useful to users.  <a href="#g36af8698cba5da05f9dca2d644c1a6df"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">SRTIME&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#g67fb7c8759946b77e0bee05dfe7b7181">rt_timer_ns2tsc</a> (SRTIME ns)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert nanoseconds to local CPU clock ticks.  <a href="#g67fb7c8759946b77e0bee05dfe7b7181"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">SRTIME&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#g493cc6fd8d90059a21f6f8249546b541">rt_timer_tsc2ns</a> (SRTIME ticks)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert local CPU clock ticks to nanoseconds.  <a href="#g493cc6fd8d90059a21f6f8249546b541"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">RTIME&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#ga589af3dafaeaa5dcbf2ef7b6dde6af8">rt_timer_tsc</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current TSC value.  <a href="#ga589af3dafaeaa5dcbf2ef7b6dde6af8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">RTIME&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#g9665d6947e29d1a19dafb5401b0f6285">rt_timer_read</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current system time.  <a href="#g9665d6947e29d1a19dafb5401b0f6285"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">SRTIME&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#gad812d18e51f398fbb0e5392b2acdf2f">rt_timer_ns2ticks</a> (SRTIME ns)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert nanoseconds to internal clock ticks.  <a href="#gad812d18e51f398fbb0e5392b2acdf2f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">SRTIME&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#ga41e1976c4df9929c1a1238cc1195f48">rt_timer_ticks2ns</a> (SRTIME ticks)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert internal clock ticks to nanoseconds.  <a href="#ga41e1976c4df9929c1a1238cc1195f48"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#g66f026b0ac68ef3acde0e6d1bdb6baaf">rt_timer_inquire</a> (<a class="el" href="structrt__timer__info.html">RT_TIMER_INFO</a> *info)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inquire about the timer.  <a href="#g66f026b0ac68ef3acde0e6d1bdb6baaf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#g7d3f782ce7b642a2759c62649777d2c7">rt_timer_spin</a> (RTIME ns)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Busy wait burning CPU cycles.  <a href="#g7d3f782ce7b642a2759c62649777d2c7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__native__timer.html#gffcb5eaef6c3a64a05445f6dafdbb155">rt_timer_set_mode</a> (RTIME nstick)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the system clock rate.  <a href="#gffcb5eaef6c3a64a05445f6dafdbb155"></a><br></td></tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g36af8698cba5da05f9dca2d644c1a6df"></a><!-- doxytag: member="timer.h::RT_TIMER_INFO" ref="g36af8698cba5da05f9dca2d644c1a6df" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structrt__timer__info.html">rt_timer_info</a>  <a class="el" href="structrt__timer__info.html">RT_TIMER_INFO</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Structure containing timer-information useful to users. 
<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__native__timer.html#g66f026b0ac68ef3acde0e6d1bdb6baaf" title="Inquire about the timer.">rt_timer_inquire()</a> </dd></dl>

</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g66f026b0ac68ef3acde0e6d1bdb6baaf"></a><!-- doxytag: member="timer.h::rt_timer_inquire" ref="g66f026b0ac68ef3acde0e6d1bdb6baaf" args="(RT_TIMER_INFO *info)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rt_timer_inquire           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structrt__timer__info.html">RT_TIMER_INFO</a> *&nbsp;</td>
          <td class="paramname"> <em>info</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Inquire about the timer. 
<p>
Return various information about the status of the system timer.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>info</em>&nbsp;</td><td>The address of a structure the timer information will be written to.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>This service always returns 0.</dd></dl>
The information block returns the period and the current system date. The period can have the following values:<p>
<ul>
<li>TM_UNSET is a special value indicating that the system timer is inactive. A call to <a class="el" href="group__native__timer.html#gffcb5eaef6c3a64a05445f6dafdbb155" title="Set the system clock rate.">rt_timer_set_mode()</a> re-activates it.</li></ul>
<p>
<ul>
<li>TM_ONESHOT is a special value indicating that the timer has been set up in oneshot mode.</li></ul>
<p>
<ul>
<li>Any other period value indicates that the system timer is currently running in periodic mode; it is a count of nanoseconds representing the period of the timer, i.e. the duration of a periodic tick or "jiffy".</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="include_2native_2timer_8h-source.html#l00043">rt_timer_info::date</a>, <a class="el" href="include_2native_2timer_8h-source.html#l00042">rt_timer_info::period</a>, <a class="el" href="include_2native_2timer_8h-source.html#l00044">rt_timer_info::tsc</a>, and <a class="el" href="timebase_8h-source.html#l00299">xntbase_get_time()</a>.</p>

</div>
</div><p>
<a class="anchor" name="gad812d18e51f398fbb0e5392b2acdf2f"></a><!-- doxytag: member="timer.h::rt_timer_ns2ticks" ref="gad812d18e51f398fbb0e5392b2acdf2f" args="(SRTIME ns)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SRTIME rt_timer_ns2ticks           </td>
          <td>(</td>
          <td class="paramtype">SRTIME&nbsp;</td>
          <td class="paramname"> <em>ns</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert nanoseconds to internal clock ticks. 
<p>
Convert a count of nanoseconds to internal clock ticks. This routine operates on signed nanosecond values.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ns</em>&nbsp;</td><td>The count of nanoseconds to convert.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The corresponding value expressed in internal clock ticks.</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="cross-link_8c-example.html#a6">cross-link.c</a>, and <a class="el" href="rtcansend_8c-example.html#a6">rtcansend.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="g67fb7c8759946b77e0bee05dfe7b7181"></a><!-- doxytag: member="timer.h::rt_timer_ns2tsc" ref="g67fb7c8759946b77e0bee05dfe7b7181" args="(SRTIME ns)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SRTIME rt_timer_ns2tsc           </td>
          <td>(</td>
          <td class="paramtype">SRTIME&nbsp;</td>
          <td class="paramname"> <em>ns</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert nanoseconds to local CPU clock ticks. 
<p>
Convert a count of nanoseconds to local CPU clock ticks. This routine operates on signed nanosecond values.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ns</em>&nbsp;</td><td>The count of nanoseconds to convert.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The corresponding value expressed in CPU clock ticks.</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g9665d6947e29d1a19dafb5401b0f6285"></a><!-- doxytag: member="timer.h::rt_timer_read" ref="g9665d6947e29d1a19dafb5401b0f6285" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RTIME rt_timer_read           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the current system time. 
<p>
Return the current time maintained by the master time base.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The current time expressed in clock ticks (see note).</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>The value returned will represent a count of jiffies if the native skin is bound to a periodic time base (see CONFIG_XENO_OPT_NATIVE_PERIOD), or nanoseconds otherwise. </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="cross-link_8c-example.html#a8">cross-link.c</a>, and <a class="el" href="trivial-periodic_8c-example.html#a1">trivial-periodic.c</a>.</dl>
</div>
</div><p>
<a class="anchor" name="gffcb5eaef6c3a64a05445f6dafdbb155"></a><!-- doxytag: member="timer.h::rt_timer_set_mode" ref="gffcb5eaef6c3a64a05445f6dafdbb155" args="(RTIME nstick)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int rt_timer_set_mode           </td>
          <td>(</td>
          <td class="paramtype">RTIME&nbsp;</td>
          <td class="paramname"> <em>nstick</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set the system clock rate. 
<p>
This routine switches to periodic timing mode and sets the clock tick rate, or resets the current timing mode to aperiodic/oneshot mode depending on the value of the <em>nstick</em> parameter. Since the native skin automatically sets its time base according to the configured policy and period at load time (see CONFIG_XENO_OPT_NATIVE_PERIOD), calling <a class="el" href="group__native__timer.html#gffcb5eaef6c3a64a05445f6dafdbb155" title="Set the system clock rate.">rt_timer_set_mode()</a> is not required from applications unless the pre-defined mode and period need to be changed dynamically.<p>
This service sets the time unit which will be relevant when specifying time intervals to the services taking timeout or delays as input parameters. In periodic mode, clock ticks will represent periodic jiffies. In oneshot mode, clock ticks will represent nanoseconds.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>nstick</em>&nbsp;</td><td>The time base period in nanoseconds. If this parameter is equal to the special TM_ONESHOT value, the time base is set to operate in a tick-less fashion (i.e. oneshot mode). Other values are interpreted as the time between two consecutive clock ticks in periodic timing mode (i.e. clock HZ = 1e9 / nstick).</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>0 is returned on success. Otherwise:</dd></dl>
<ul>
<li>-ENODEV is returned if the underlying architecture does not support the requested periodic timing. Aperiodic/oneshot timing is always supported.</li></ul>
<p>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
<p>References <a class="el" href="timebase_8c-source.html#l00316">xntbase_switch()</a>.</p>

</div>
</div><p>
<a class="anchor" name="g7d3f782ce7b642a2759c62649777d2c7"></a><!-- doxytag: member="timer.h::rt_timer_spin" ref="g7d3f782ce7b642a2759c62649777d2c7" args="(RTIME ns)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rt_timer_spin           </td>
          <td>(</td>
          <td class="paramtype">RTIME&nbsp;</td>
          <td class="paramname"> <em>ns</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Busy wait burning CPU cycles. 
<p>
Enter a busy waiting loop for a count of nanoseconds. The precision of this service largely depends on the availability of a time stamp counter on the current CPU.<p>
Since this service is usually called with interrupts enabled, the caller might be preempted by other real-time activities, therefore the actual delay might be longer than specified.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ns</em>&nbsp;</td><td>The time to wait expressed in nanoseconds.</td></tr>
  </table>
</dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="ga41e1976c4df9929c1a1238cc1195f48"></a><!-- doxytag: member="timer.h::rt_timer_ticks2ns" ref="ga41e1976c4df9929c1a1238cc1195f48" args="(SRTIME ticks)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SRTIME rt_timer_ticks2ns           </td>
          <td>(</td>
          <td class="paramtype">SRTIME&nbsp;</td>
          <td class="paramname"> <em>ticks</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert internal clock ticks to nanoseconds. 
<p>
Convert a count of internal clock ticks to nanoseconds. This routine operates on signed tick values.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ticks</em>&nbsp;</td><td>The count of internal clock ticks to convert.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The corresponding value expressed in nanoseconds.</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="ga589af3dafaeaa5dcbf2ef7b6dde6af8"></a><!-- doxytag: member="timer.h::rt_timer_tsc" ref="ga589af3dafaeaa5dcbf2ef7b6dde6af8" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">RTIME rt_timer_tsc           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the current TSC value. 
<p>
Return the value of the time stamp counter (TSC) maintained by the CPU of the underlying architecture.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The current value of the TSC.</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
<a class="anchor" name="g493cc6fd8d90059a21f6f8249546b541"></a><!-- doxytag: member="timer.h::rt_timer_tsc2ns" ref="g493cc6fd8d90059a21f6f8249546b541" args="(SRTIME ticks)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SRTIME rt_timer_tsc2ns           </td>
          <td>(</td>
          <td class="paramtype">SRTIME&nbsp;</td>
          <td class="paramname"> <em>ticks</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert local CPU clock ticks to nanoseconds. 
<p>
Convert a local CPU clock ticks to nanoseconds. This routine operates on signed tick values.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ticks</em>&nbsp;</td><td>The count of local CPU clock ticks to convert.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The corresponding value expressed in nanoseconds.</dd></dl>
Environments:<p>
This service can be called from:<p>
<ul>
<li>Kernel module initialization/cleanup code</li><li>Interrupt service routine</li><li>Kernel-based task</li><li>User-space task</li></ul>
<p>
Rescheduling: never. 
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 2 12:48:38 2010 for Xenomai API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>