File: rttesting_8h-source.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 (188 lines) | stat: -rw-r--r-- 16,090 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
<!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: include/rtdm/rttesting.h Source File</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 class="current"><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>
<h1>include/rtdm/rttesting.h</h1><a href="rttesting_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00060"></a>00060 <span class="preprocessor">#ifndef _RTTESTING_H</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define _RTTESTING_H</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a>00063 <span class="preprocessor">#include &lt;<a class="code" href="rtdm_8h.html" title="Real-Time Driver Model for Xenomai, user API header.">rtdm/rtdm.h</a>&gt;</span>
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="preprocessor">#define RTTST_PROFILE_VER               2</span>
<a name="l00066"></a>00066 <span class="preprocessor"></span>
<a name="l00067"></a>00067 <span class="keyword">typedef</span> <span class="keyword">struct </span>rttst_bench_res {
<a name="l00068"></a>00068         <span class="keywordtype">long</span> <span class="keywordtype">long</span> avg;
<a name="l00069"></a>00069         <span class="keywordtype">long</span> min;
<a name="l00070"></a>00070         <span class="keywordtype">long</span> max;
<a name="l00071"></a>00071         <span class="keywordtype">long</span> overruns;
<a name="l00072"></a>00072         <span class="keywordtype">long</span> test_loops;
<a name="l00073"></a>00073 } rttst_bench_res_t;
<a name="l00074"></a>00074 
<a name="l00075"></a>00075 <span class="keyword">typedef</span> <span class="keyword">struct </span>rttst_interm_bench_res {
<a name="l00076"></a>00076         <span class="keyword">struct </span>rttst_bench_res last;
<a name="l00077"></a>00077         <span class="keyword">struct </span>rttst_bench_res overall;
<a name="l00078"></a>00078 } rttst_interm_bench_res_t;
<a name="l00079"></a>00079 
<a name="l00080"></a>00080 <span class="keyword">typedef</span> <span class="keyword">struct </span>rttst_overall_bench_res {
<a name="l00081"></a>00081         <span class="keyword">struct </span>rttst_bench_res result;
<a name="l00082"></a>00082         <span class="keywordtype">long</span> *histogram_avg;
<a name="l00083"></a>00083         <span class="keywordtype">long</span> *histogram_min;
<a name="l00084"></a>00084         <span class="keywordtype">long</span> *histogram_max;
<a name="l00085"></a>00085         <span class="keywordtype">void</span> *__padding;        <span class="comment">/* align to dwords on 32-bit archs */</span>
<a name="l00086"></a>00086 } rttst_overall_bench_res_t;
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="preprocessor">#define RTTST_TMBENCH_INVALID           -1 </span><span class="comment">/* internal use only */</span>
<a name="l00089"></a>00089 <span class="preprocessor">#define RTTST_TMBENCH_TASK              0</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_TMBENCH_HANDLER           1</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span>
<a name="l00092"></a>00092 <span class="keyword">typedef</span> <span class="keyword">struct </span>rttst_tmbench_config {
<a name="l00093"></a>00093         <span class="keywordtype">int</span> mode;
<a name="l00094"></a>00094         <span class="keywordtype">int</span> priority;
<a name="l00095"></a>00095         <a class="code" href="group__rtdm.html#gededf91e760e3268235351dcc9d9dcda" title="RTDM type for representing relative intervals.">nanosecs_rel_t</a> period;
<a name="l00096"></a>00096         <span class="keywordtype">int</span> warmup_loops;
<a name="l00097"></a>00097         <span class="keywordtype">int</span> histogram_size;
<a name="l00098"></a>00098         <span class="keywordtype">int</span> histogram_bucketsize;
<a name="l00099"></a>00099         <span class="keywordtype">int</span> freeze_max;
<a name="l00100"></a>00100 } rttst_tmbench_config_t;
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 <span class="preprocessor">#define RTTST_IRQBENCH_USER_TASK        0</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_IRQBENCH_KERNEL_TASK      1</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_IRQBENCH_HANDLER          2</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_IRQBENCH_HARD_IRQ         3</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span>
<a name="l00107"></a>00107 <span class="preprocessor">#define RTTST_IRQBENCH_SERPORT          0</span>
<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_IRQBENCH_PARPORT          1</span>
<a name="l00109"></a>00109 <span class="preprocessor"></span>
<a name="l00110"></a>00110 <span class="keyword">typedef</span> <span class="keyword">struct </span>rttst_irqbench_config {
<a name="l00111"></a>00111         <span class="keywordtype">int</span> mode;
<a name="l00112"></a>00112         <span class="keywordtype">int</span> priority;
<a name="l00113"></a>00113         <span class="keywordtype">int</span> calibration_loops;
<a name="l00114"></a>00114         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> port_type;
<a name="l00115"></a>00115         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> port_ioaddr;
<a name="l00116"></a>00116         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> port_irq;
<a name="l00117"></a>00117 } rttst_irqbench_config_t;
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 <span class="keyword">typedef</span> <span class="keyword">struct </span>rttst_irqbench_stats {
<a name="l00120"></a>00120         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> irqs_received;
<a name="l00121"></a>00121         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">long</span> irqs_acknowledged;
<a name="l00122"></a>00122 } rttst_irqbench_stats_t;
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 <span class="keyword">struct </span>rttst_swtest_task {
<a name="l00125"></a>00125         <span class="keywordtype">unsigned</span> index;
<a name="l00126"></a>00126         <span class="keywordtype">unsigned</span> flags;
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="comment">/* Possible values for struct rttst_swtest_task::flags. */</span>
<a name="l00130"></a>00130 <span class="preprocessor">#define RTTST_SWTEST_FPU                0x1</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_SWTEST_USE_FPU            0x2 </span><span class="comment">/* Only for kernel-space tasks. */</span>
<a name="l00132"></a>00132 <span class="preprocessor">#define RTTST_SWTEST_FREEZE             0x4 </span><span class="comment">/* Only for kernel-space tasks. */</span>
<a name="l00133"></a>00133 
<a name="l00134"></a>00134 <span class="keyword">struct </span>rttst_swtest_dir {
<a name="l00135"></a>00135         <span class="keywordtype">unsigned</span> from;
<a name="l00136"></a>00136         <span class="keywordtype">unsigned</span> to;
<a name="l00137"></a>00137 };
<a name="l00138"></a>00138 
<a name="l00139"></a>00139 <span class="keyword">struct </span>rttst_swtest_error {
<a name="l00140"></a>00140         <span class="keyword">struct </span>rttst_swtest_dir last_switch;
<a name="l00141"></a>00141         <span class="keywordtype">unsigned</span> fp_val;
<a name="l00142"></a>00142 };
<a name="l00143"></a>00143 
<a name="l00144"></a>00144 <span class="preprocessor">#define RTTST_RTDM_NORMAL_CLOSE         0</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_RTDM_DEFER_CLOSE_HANDLER  1</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#define RTTST_RTDM_DEFER_CLOSE_CONTEXT  2</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span>
<a name="l00148"></a>00148 <span class="preprocessor">#define RTIOC_TYPE_TESTING              RTDM_CLASS_TESTING</span>
<a name="l00149"></a>00149 <span class="preprocessor"></span>
<a name="l00154"></a><a class="code" href="group__rttesting.html#gd2af8020baea8618ee0fe06ba1b446ff">00154</a> <span class="preprocessor">#define RTDM_SUBCLASS_TIMERBENCH        0</span>
<a name="l00155"></a>00155 <span class="preprocessor"></span>
<a name="l00156"></a><a class="code" href="group__rttesting.html#g337782a702b89987fdd7e9f903e2ba75">00156</a> <span class="preprocessor">#define RTDM_SUBCLASS_IRQBENCH          1</span>
<a name="l00157"></a>00157 <span class="preprocessor"></span>
<a name="l00158"></a><a class="code" href="group__rttesting.html#gfd0cb92f7621e89f958f8a627f7aee68">00158</a> <span class="preprocessor">#define RTDM_SUBCLASS_SWITCHTEST        2</span>
<a name="l00159"></a>00159 <span class="preprocessor"></span>
<a name="l00160"></a><a class="code" href="group__rttesting.html#gd89bc4cfa47bfc109b9316ceca5f786b">00160</a> <span class="preprocessor">#define RTDM_SUBCLASS_RTDMTEST          3</span>
<a name="l00161"></a>00161 <span class="preprocessor"></span>
<a name="l00167"></a>00167 <span class="preprocessor">#define RTTST_RTIOC_INTERM_BENCH_RES \</span>
<a name="l00168"></a>00168 <span class="preprocessor">        _IOWR(RTIOC_TYPE_TESTING, 0x00, struct rttst_interm_bench_res)</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span>
<a name="l00170"></a>00170 <span class="preprocessor">#define RTTST_RTIOC_TMBENCH_START \</span>
<a name="l00171"></a>00171 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x10, struct rttst_tmbench_config)</span>
<a name="l00172"></a>00172 <span class="preprocessor"></span>
<a name="l00173"></a>00173 <span class="preprocessor">#define RTTST_RTIOC_TMBENCH_STOP \</span>
<a name="l00174"></a>00174 <span class="preprocessor">        _IOWR(RTIOC_TYPE_TESTING, 0x11, struct rttst_overall_bench_res)</span>
<a name="l00175"></a>00175 <span class="preprocessor"></span>
<a name="l00176"></a>00176 <span class="preprocessor">#define RTTST_RTIOC_IRQBENCH_START \</span>
<a name="l00177"></a>00177 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x20, struct rttst_irqbench_config)</span>
<a name="l00178"></a>00178 <span class="preprocessor"></span>
<a name="l00179"></a>00179 <span class="preprocessor">#define RTTST_RTIOC_IRQBENCH_STOP \</span>
<a name="l00180"></a>00180 <span class="preprocessor">        _IO(RTIOC_TYPE_TESTING, 0x21)</span>
<a name="l00181"></a>00181 <span class="preprocessor"></span>
<a name="l00182"></a>00182 <span class="preprocessor">#define RTTST_RTIOC_IRQBENCH_GET_STATS \</span>
<a name="l00183"></a>00183 <span class="preprocessor">        _IOR(RTIOC_TYPE_TESTING, 0x22, struct rttst_irqbench_stats)</span>
<a name="l00184"></a>00184 <span class="preprocessor"></span>
<a name="l00185"></a>00185 <span class="preprocessor">#define RTTST_RTIOC_IRQBENCH_WAIT_IRQ \</span>
<a name="l00186"></a>00186 <span class="preprocessor">        _IO(RTIOC_TYPE_TESTING, 0x23)</span>
<a name="l00187"></a>00187 <span class="preprocessor"></span>
<a name="l00188"></a>00188 <span class="preprocessor">#define RTTST_RTIOC_IRQBENCH_REPLY_IRQ \</span>
<a name="l00189"></a>00189 <span class="preprocessor">        _IO(RTIOC_TYPE_TESTING, 0x24)</span>
<a name="l00190"></a>00190 <span class="preprocessor"></span>
<a name="l00191"></a>00191 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_SET_TASKS_COUNT \</span>
<a name="l00192"></a>00192 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x30, unsigned long)</span>
<a name="l00193"></a>00193 <span class="preprocessor"></span>
<a name="l00194"></a>00194 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_SET_CPU \</span>
<a name="l00195"></a>00195 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x31, unsigned long)</span>
<a name="l00196"></a>00196 <span class="preprocessor"></span>
<a name="l00197"></a>00197 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_REGISTER_UTASK \</span>
<a name="l00198"></a>00198 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x32, struct rttst_swtest_task)</span>
<a name="l00199"></a>00199 <span class="preprocessor"></span>
<a name="l00200"></a>00200 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_CREATE_KTASK \</span>
<a name="l00201"></a>00201 <span class="preprocessor">        _IOWR(RTIOC_TYPE_TESTING, 0x33, struct rttst_swtest_task)</span>
<a name="l00202"></a>00202 <span class="preprocessor"></span>
<a name="l00203"></a>00203 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_PEND \</span>
<a name="l00204"></a>00204 <span class="preprocessor">        _IOR(RTIOC_TYPE_TESTING, 0x34, struct rttst_swtest_task)</span>
<a name="l00205"></a>00205 <span class="preprocessor"></span>
<a name="l00206"></a>00206 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_SWITCH_TO \</span>
<a name="l00207"></a>00207 <span class="preprocessor">        _IOR(RTIOC_TYPE_TESTING, 0x35, struct rttst_swtest_dir)</span>
<a name="l00208"></a>00208 <span class="preprocessor"></span>
<a name="l00209"></a>00209 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_GET_SWITCHES_COUNT \</span>
<a name="l00210"></a>00210 <span class="preprocessor">        _IOR(RTIOC_TYPE_TESTING, 0x36, unsigned long)</span>
<a name="l00211"></a>00211 <span class="preprocessor"></span>
<a name="l00212"></a>00212 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_GET_LAST_ERROR \</span>
<a name="l00213"></a>00213 <span class="preprocessor">        _IOR(RTIOC_TYPE_TESTING, 0x37, struct rttst_swtest_error)</span>
<a name="l00214"></a>00214 <span class="preprocessor"></span>
<a name="l00215"></a>00215 <span class="preprocessor">#define RTTST_RTIOC_SWTEST_SET_PAUSE \</span>
<a name="l00216"></a>00216 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x38, unsigned long)</span>
<a name="l00217"></a>00217 <span class="preprocessor"></span>
<a name="l00218"></a>00218 <span class="preprocessor">#define RTTST_RTIOC_RTDM_DEFER_CLOSE \</span>
<a name="l00219"></a>00219 <span class="preprocessor">        _IOW(RTIOC_TYPE_TESTING, 0x40, unsigned long)</span>
<a name="l00220"></a>00220 <span class="preprocessor"></span>
<a name="l00224"></a>00224 <span class="preprocessor">#endif </span><span class="comment">/* _RTTESTING_H */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 2 12:48:36 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>