1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2008. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #define CONFIGURE_INIT |
---|
13 | #include "system.h" |
---|
14 | |
---|
15 | uint8_t Memory_area[ 2048 ]; |
---|
16 | uint8_t Internal_port_area[ 256 ]; |
---|
17 | uint8_t External_port_area[ 256 ]; |
---|
18 | |
---|
19 | rtems_task Task_1( |
---|
20 | rtems_task_argument argument |
---|
21 | ); |
---|
22 | |
---|
23 | rtems_task Init( |
---|
24 | rtems_task_argument argument |
---|
25 | ) |
---|
26 | { rtems_id id; |
---|
27 | rtems_status_code status; |
---|
28 | |
---|
29 | benchmark_timer_disable_subtracting_average_overhead( TRUE ); |
---|
30 | |
---|
31 | Print_Warning(); |
---|
32 | |
---|
33 | puts( "\n\n*** TIME TEST OVERHEAD ***" ); |
---|
34 | |
---|
35 | status = rtems_task_create( |
---|
36 | rtems_build_name( 'T', 'A', '1', ' ' ), |
---|
37 | RTEMS_MAXIMUM_PRIORITY - 1, |
---|
38 | RTEMS_MINIMUM_STACK_SIZE, |
---|
39 | RTEMS_DEFAULT_MODES, |
---|
40 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
41 | &id |
---|
42 | ); |
---|
43 | directive_failed( status, "rtems_task_create of TA1" ); |
---|
44 | |
---|
45 | status = rtems_task_start( id, Task_1, 0 ); |
---|
46 | directive_failed( status, "rtems_task_start of TA1" ); |
---|
47 | |
---|
48 | status = rtems_task_delete( RTEMS_SELF ); |
---|
49 | directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); |
---|
50 | } |
---|
51 | |
---|
52 | /* comment out the following include to verify type are correct */ |
---|
53 | #include "dumrtems.h" |
---|
54 | |
---|
55 | rtems_task Task_1( |
---|
56 | rtems_task_argument argument |
---|
57 | ) |
---|
58 | { |
---|
59 | rtems_name name; |
---|
60 | uint32_t index RTEMS_GCC_NOWARN_UNUSED; |
---|
61 | rtems_id id RTEMS_GCC_NOWARN_UNUSED; |
---|
62 | rtems_task_priority in_priority; |
---|
63 | rtems_task_priority out_priority RTEMS_GCC_NOWARN_UNUSED; |
---|
64 | rtems_mode in_mode; |
---|
65 | rtems_mode mask; |
---|
66 | rtems_mode out_mode RTEMS_GCC_NOWARN_UNUSED; |
---|
67 | uint32_t note; |
---|
68 | rtems_time_of_day time RTEMS_GCC_NOWARN_UNUSED; |
---|
69 | rtems_interval timeout; |
---|
70 | rtems_signal_set signals; |
---|
71 | void *address_1 RTEMS_GCC_NOWARN_UNUSED; |
---|
72 | rtems_event_set events RTEMS_GCC_NOWARN_UNUSED; |
---|
73 | long buffer[ 4 ] RTEMS_GCC_NOWARN_UNUSED; |
---|
74 | uint32_t count RTEMS_GCC_NOWARN_UNUSED; |
---|
75 | rtems_device_major_number major; |
---|
76 | rtems_device_minor_number minor; |
---|
77 | uint32_t io_result RTEMS_GCC_NOWARN_UNUSED; |
---|
78 | uint32_t error; |
---|
79 | rtems_clock_get_options options; |
---|
80 | |
---|
81 | name = rtems_build_name( 'N', 'A', 'M', 'E' ); |
---|
82 | in_priority = 250; |
---|
83 | in_mode = RTEMS_NO_PREEMPT; |
---|
84 | mask = RTEMS_PREEMPT_MASK; |
---|
85 | note = 8; |
---|
86 | timeout = 100; |
---|
87 | signals = RTEMS_SIGNAL_1 | RTEMS_SIGNAL_3; |
---|
88 | major = 10; |
---|
89 | minor = 0; |
---|
90 | error = 100; |
---|
91 | options = 0; |
---|
92 | |
---|
93 | /* rtems_shutdown_executive */ |
---|
94 | |
---|
95 | benchmark_timer_initialize(); |
---|
96 | for ( index=1 ; index <= OPERATION_COUNT ; index++ ) |
---|
97 | (void) rtems_shutdown_executive( error ); |
---|
98 | end_time = benchmark_timer_read(); |
---|
99 | |
---|
100 | put_time( |
---|
101 | "rtems_shutdown_executive", |
---|
102 | end_time, |
---|
103 | OPERATION_COUNT, |
---|
104 | overhead, |
---|
105 | 0 |
---|
106 | ); |
---|
107 | |
---|
108 | /* rtems_task_create */ |
---|
109 | |
---|
110 | benchmark_timer_initialize(); |
---|
111 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
112 | (void) rtems_task_create( |
---|
113 | name, |
---|
114 | in_priority, |
---|
115 | RTEMS_MINIMUM_STACK_SIZE, |
---|
116 | RTEMS_DEFAULT_MODES, |
---|
117 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
118 | &id |
---|
119 | ); |
---|
120 | end_time = benchmark_timer_read(); |
---|
121 | |
---|
122 | put_time( |
---|
123 | "rtems_task_create", |
---|
124 | end_time, |
---|
125 | OPERATION_COUNT, |
---|
126 | overhead, |
---|
127 | 0 |
---|
128 | ); |
---|
129 | |
---|
130 | /* rtems_task_ident */ |
---|
131 | |
---|
132 | benchmark_timer_initialize(); |
---|
133 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
134 | (void) rtems_task_ident( name, RTEMS_SEARCH_ALL_NODES, id ); |
---|
135 | end_time = benchmark_timer_read(); |
---|
136 | |
---|
137 | put_time( |
---|
138 | "rtems_task_ident", |
---|
139 | end_time, |
---|
140 | OPERATION_COUNT, |
---|
141 | overhead, |
---|
142 | 0 |
---|
143 | ); |
---|
144 | |
---|
145 | /* rtems_task_start */ |
---|
146 | |
---|
147 | benchmark_timer_initialize(); |
---|
148 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
149 | (void) rtems_task_start( id, Task_1, 0 ); |
---|
150 | end_time = benchmark_timer_read(); |
---|
151 | |
---|
152 | put_time( |
---|
153 | "rtems_task_start", |
---|
154 | end_time, |
---|
155 | OPERATION_COUNT, |
---|
156 | overhead, |
---|
157 | 0 |
---|
158 | ); |
---|
159 | |
---|
160 | /* rtems_task_restart */ |
---|
161 | |
---|
162 | benchmark_timer_initialize(); |
---|
163 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
164 | (void) rtems_task_restart( id, 0 ); |
---|
165 | end_time = benchmark_timer_read(); |
---|
166 | |
---|
167 | put_time( |
---|
168 | "rtems_task_restart", |
---|
169 | end_time, |
---|
170 | OPERATION_COUNT, |
---|
171 | overhead, |
---|
172 | 0 |
---|
173 | ); |
---|
174 | |
---|
175 | /* rtems_task_delete */ |
---|
176 | |
---|
177 | benchmark_timer_initialize(); |
---|
178 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
179 | (void) rtems_task_delete( id ); |
---|
180 | end_time = benchmark_timer_read(); |
---|
181 | |
---|
182 | put_time( |
---|
183 | "rtems_task_delete", |
---|
184 | end_time, |
---|
185 | OPERATION_COUNT, |
---|
186 | overhead, |
---|
187 | 0 |
---|
188 | ); |
---|
189 | |
---|
190 | /* rtems_task_suspend */ |
---|
191 | |
---|
192 | benchmark_timer_initialize(); |
---|
193 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
194 | (void) rtems_task_suspend( id ); |
---|
195 | end_time = benchmark_timer_read(); |
---|
196 | |
---|
197 | put_time( |
---|
198 | "rtems_task_suspend", |
---|
199 | end_time, |
---|
200 | OPERATION_COUNT, |
---|
201 | overhead, |
---|
202 | 0 |
---|
203 | ); |
---|
204 | |
---|
205 | /* rtems_task_resume */ |
---|
206 | |
---|
207 | benchmark_timer_initialize(); |
---|
208 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
209 | (void) rtems_task_resume( id ); |
---|
210 | end_time = benchmark_timer_read(); |
---|
211 | |
---|
212 | put_time( |
---|
213 | "rtems_task_resume", |
---|
214 | end_time, |
---|
215 | OPERATION_COUNT, |
---|
216 | overhead, |
---|
217 | 0 |
---|
218 | ); |
---|
219 | |
---|
220 | /* rtems_task_set_priority */ |
---|
221 | |
---|
222 | benchmark_timer_initialize(); |
---|
223 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
224 | (void) rtems_task_set_priority( id, in_priority, &out_priority ); |
---|
225 | end_time = benchmark_timer_read(); |
---|
226 | |
---|
227 | put_time( |
---|
228 | "rtems_task_set_priority", |
---|
229 | end_time, |
---|
230 | OPERATION_COUNT, |
---|
231 | overhead, |
---|
232 | 0 |
---|
233 | ); |
---|
234 | |
---|
235 | /* rtems_task_mode */ |
---|
236 | |
---|
237 | benchmark_timer_initialize(); |
---|
238 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
239 | (void) rtems_task_mode( in_mode, mask, &out_mode ); |
---|
240 | end_time = benchmark_timer_read(); |
---|
241 | |
---|
242 | put_time( |
---|
243 | "rtems_task_mode", |
---|
244 | end_time, |
---|
245 | OPERATION_COUNT, |
---|
246 | overhead, |
---|
247 | 0 |
---|
248 | ); |
---|
249 | |
---|
250 | /* rtems_task_get_note */ |
---|
251 | |
---|
252 | benchmark_timer_initialize(); |
---|
253 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
254 | (void) rtems_task_get_note( id, 1, note ); |
---|
255 | end_time = benchmark_timer_read(); |
---|
256 | |
---|
257 | put_time( |
---|
258 | "rtems_task_get_note", |
---|
259 | end_time, |
---|
260 | OPERATION_COUNT, |
---|
261 | overhead, |
---|
262 | 0 |
---|
263 | ); |
---|
264 | |
---|
265 | /* rtems_task_set_note */ |
---|
266 | |
---|
267 | benchmark_timer_initialize(); |
---|
268 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
269 | (void) rtems_task_set_note( id, 1, note ); |
---|
270 | end_time = benchmark_timer_read(); |
---|
271 | |
---|
272 | put_time( |
---|
273 | "rtems_task_set_note", |
---|
274 | end_time, |
---|
275 | OPERATION_COUNT, |
---|
276 | overhead, |
---|
277 | 0 |
---|
278 | ); |
---|
279 | |
---|
280 | /* rtems_task_wake_when */ |
---|
281 | |
---|
282 | benchmark_timer_initialize(); |
---|
283 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
284 | (void) rtems_task_wake_when( time ); |
---|
285 | end_time = benchmark_timer_read(); |
---|
286 | |
---|
287 | put_time( |
---|
288 | "rtems_task_wake_when", |
---|
289 | end_time, |
---|
290 | OPERATION_COUNT, |
---|
291 | overhead, |
---|
292 | 0 |
---|
293 | ); |
---|
294 | |
---|
295 | /* rtems_task_wake_after */ |
---|
296 | |
---|
297 | benchmark_timer_initialize(); |
---|
298 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
299 | (void) rtems_task_wake_after( timeout ); |
---|
300 | end_time = benchmark_timer_read(); |
---|
301 | |
---|
302 | put_time( |
---|
303 | "rtems_task_wake_after", |
---|
304 | end_time, |
---|
305 | OPERATION_COUNT, |
---|
306 | overhead, |
---|
307 | 0 |
---|
308 | ); |
---|
309 | |
---|
310 | /* rtems_interrupt_catch */ |
---|
311 | |
---|
312 | benchmark_timer_initialize(); |
---|
313 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
314 | (void) rtems_interrupt_catch( Isr_handler, 5, address_1 ); |
---|
315 | end_time = benchmark_timer_read(); |
---|
316 | |
---|
317 | put_time( |
---|
318 | "rtems_interrupt_catch", |
---|
319 | end_time, |
---|
320 | OPERATION_COUNT, |
---|
321 | overhead, |
---|
322 | 0 |
---|
323 | ); |
---|
324 | |
---|
325 | /* rtems_clock_get */ |
---|
326 | |
---|
327 | benchmark_timer_initialize(); |
---|
328 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
329 | (void) rtems_clock_get( options, time ); |
---|
330 | end_time = benchmark_timer_read(); |
---|
331 | |
---|
332 | put_time( |
---|
333 | "rtems_clock_get", |
---|
334 | end_time, |
---|
335 | OPERATION_COUNT, |
---|
336 | overhead, |
---|
337 | 0 |
---|
338 | ); |
---|
339 | |
---|
340 | /* rtems_clock_set */ |
---|
341 | |
---|
342 | benchmark_timer_initialize(); |
---|
343 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
344 | (void) rtems_clock_set( time ); |
---|
345 | end_time = benchmark_timer_read(); |
---|
346 | |
---|
347 | put_time( |
---|
348 | "rtems_clock_set", |
---|
349 | end_time, |
---|
350 | OPERATION_COUNT, |
---|
351 | overhead, |
---|
352 | 0 |
---|
353 | ); |
---|
354 | |
---|
355 | /* rtems_clock_tick */ |
---|
356 | |
---|
357 | benchmark_timer_initialize(); |
---|
358 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
359 | (void) rtems_clock_tick(); |
---|
360 | end_time = benchmark_timer_read(); |
---|
361 | |
---|
362 | put_time( |
---|
363 | "rtems_clock_tick", |
---|
364 | end_time, |
---|
365 | OPERATION_COUNT, |
---|
366 | overhead, |
---|
367 | 0 |
---|
368 | ); |
---|
369 | |
---|
370 | rtems_test_pause(); |
---|
371 | |
---|
372 | /* rtems_timer_create */ |
---|
373 | |
---|
374 | benchmark_timer_initialize(); |
---|
375 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
376 | (void) rtems_timer_create( name, &id ); |
---|
377 | end_time = benchmark_timer_read(); |
---|
378 | |
---|
379 | put_time( |
---|
380 | "rtems_timer_create", |
---|
381 | end_time, |
---|
382 | OPERATION_COUNT, |
---|
383 | overhead, |
---|
384 | 0 |
---|
385 | ); |
---|
386 | |
---|
387 | /* rtems_timer_delete */ |
---|
388 | |
---|
389 | benchmark_timer_initialize(); |
---|
390 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
391 | (void) rtems_timer_delete( id ); |
---|
392 | end_time = benchmark_timer_read(); |
---|
393 | |
---|
394 | put_time( |
---|
395 | "rtems_timer_delete", |
---|
396 | end_time, |
---|
397 | OPERATION_COUNT, |
---|
398 | overhead, |
---|
399 | 0 |
---|
400 | ); |
---|
401 | |
---|
402 | /* rtems_timer_ident */ |
---|
403 | |
---|
404 | benchmark_timer_initialize(); |
---|
405 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
406 | (void) rtems_timer_ident( name, id ); |
---|
407 | end_time = benchmark_timer_read(); |
---|
408 | |
---|
409 | put_time( |
---|
410 | "rtems_timer_ident", |
---|
411 | end_time, |
---|
412 | OPERATION_COUNT, |
---|
413 | overhead, |
---|
414 | 0 |
---|
415 | ); |
---|
416 | |
---|
417 | /* rtems_timer_fire_after */ |
---|
418 | |
---|
419 | benchmark_timer_initialize(); |
---|
420 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
421 | (void) rtems_timer_fire_after( |
---|
422 | id, |
---|
423 | timeout, |
---|
424 | Timer_handler, |
---|
425 | NULL |
---|
426 | ); |
---|
427 | end_time = benchmark_timer_read(); |
---|
428 | |
---|
429 | put_time( |
---|
430 | "rtems_timer_fire_after", |
---|
431 | end_time, |
---|
432 | OPERATION_COUNT, |
---|
433 | overhead, |
---|
434 | 0 |
---|
435 | ); |
---|
436 | |
---|
437 | /* rtems_timer_fire_when */ |
---|
438 | |
---|
439 | benchmark_timer_initialize(); |
---|
440 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
441 | (void) rtems_timer_fire_when( |
---|
442 | id, |
---|
443 | time, |
---|
444 | Timer_handler, |
---|
445 | NULL |
---|
446 | ); |
---|
447 | end_time = benchmark_timer_read(); |
---|
448 | |
---|
449 | put_time( |
---|
450 | "rtems_timer_fire_when", |
---|
451 | end_time, |
---|
452 | OPERATION_COUNT, |
---|
453 | overhead, |
---|
454 | 0 |
---|
455 | ); |
---|
456 | |
---|
457 | /* rtems_timer_reset */ |
---|
458 | |
---|
459 | benchmark_timer_initialize(); |
---|
460 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
461 | (void) rtems_timer_reset( id ); |
---|
462 | end_time = benchmark_timer_read(); |
---|
463 | |
---|
464 | put_time( |
---|
465 | "rtems_timer_reset", |
---|
466 | end_time, |
---|
467 | OPERATION_COUNT, |
---|
468 | overhead, |
---|
469 | 0 |
---|
470 | ); |
---|
471 | |
---|
472 | /* rtems_timer_cancel */ |
---|
473 | |
---|
474 | benchmark_timer_initialize(); |
---|
475 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
476 | (void) rtems_timer_cancel( id ); |
---|
477 | end_time = benchmark_timer_read(); |
---|
478 | |
---|
479 | put_time( |
---|
480 | "rtems_timer_cancel", |
---|
481 | end_time, |
---|
482 | OPERATION_COUNT, |
---|
483 | overhead, |
---|
484 | 0 |
---|
485 | ); |
---|
486 | |
---|
487 | /* rtems_semaphore_create */ |
---|
488 | |
---|
489 | benchmark_timer_initialize(); |
---|
490 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
491 | (void) rtems_semaphore_create( |
---|
492 | name, |
---|
493 | 128, |
---|
494 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
495 | RTEMS_NO_PRIORITY, |
---|
496 | &id |
---|
497 | ); |
---|
498 | end_time = benchmark_timer_read(); |
---|
499 | |
---|
500 | put_time( |
---|
501 | "rtems_semaphore_create", |
---|
502 | end_time, |
---|
503 | OPERATION_COUNT, |
---|
504 | overhead, |
---|
505 | 0 |
---|
506 | ); |
---|
507 | |
---|
508 | /* rtems_semaphore_delete */ |
---|
509 | |
---|
510 | benchmark_timer_initialize(); |
---|
511 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
512 | (void) rtems_semaphore_delete( id ); |
---|
513 | end_time = benchmark_timer_read(); |
---|
514 | |
---|
515 | put_time( |
---|
516 | "rtems_semaphore_delete", |
---|
517 | end_time, |
---|
518 | OPERATION_COUNT, |
---|
519 | overhead, |
---|
520 | 0 |
---|
521 | ); |
---|
522 | |
---|
523 | /* rtems_semaphore_ident */ |
---|
524 | |
---|
525 | benchmark_timer_initialize(); |
---|
526 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
527 | (void) rtems_semaphore_ident( name, RTEMS_SEARCH_ALL_NODES, id ); |
---|
528 | end_time = benchmark_timer_read(); |
---|
529 | |
---|
530 | put_time( |
---|
531 | "rtems_semaphore_ident", |
---|
532 | end_time, |
---|
533 | OPERATION_COUNT, |
---|
534 | overhead, |
---|
535 | 0 |
---|
536 | ); |
---|
537 | |
---|
538 | /* rtems_semaphore_obtain */ |
---|
539 | |
---|
540 | benchmark_timer_initialize(); |
---|
541 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
542 | (void) rtems_semaphore_obtain( id, RTEMS_DEFAULT_OPTIONS, timeout ); |
---|
543 | end_time = benchmark_timer_read(); |
---|
544 | |
---|
545 | put_time( |
---|
546 | "rtems_semaphore_obtain", |
---|
547 | end_time, |
---|
548 | OPERATION_COUNT, |
---|
549 | overhead, |
---|
550 | 0 |
---|
551 | ); |
---|
552 | |
---|
553 | /* rtems_semaphore_release */ |
---|
554 | |
---|
555 | benchmark_timer_initialize(); |
---|
556 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
557 | (void) rtems_semaphore_release( id ); |
---|
558 | end_time = benchmark_timer_read(); |
---|
559 | |
---|
560 | put_time( |
---|
561 | "rtems_semaphore_release", |
---|
562 | end_time, |
---|
563 | OPERATION_COUNT, |
---|
564 | overhead, |
---|
565 | 0 |
---|
566 | ); |
---|
567 | |
---|
568 | /* rtems_message_queue_create */ |
---|
569 | |
---|
570 | benchmark_timer_initialize(); |
---|
571 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
572 | (void) rtems_message_queue_create( |
---|
573 | name, |
---|
574 | 128, |
---|
575 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
576 | &id |
---|
577 | ); |
---|
578 | end_time = benchmark_timer_read(); |
---|
579 | |
---|
580 | put_time( |
---|
581 | "rtems_message_queue_create", |
---|
582 | end_time, |
---|
583 | OPERATION_COUNT, |
---|
584 | overhead, |
---|
585 | 0 |
---|
586 | ); |
---|
587 | |
---|
588 | /* rtems_message_queue_ident */ |
---|
589 | |
---|
590 | benchmark_timer_initialize(); |
---|
591 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
592 | (void) rtems_message_queue_ident( |
---|
593 | name, |
---|
594 | RTEMS_SEARCH_ALL_NODES, |
---|
595 | id |
---|
596 | ); |
---|
597 | end_time = benchmark_timer_read(); |
---|
598 | |
---|
599 | put_time( |
---|
600 | "rtems_message_queue_ident", |
---|
601 | end_time, |
---|
602 | OPERATION_COUNT, |
---|
603 | overhead, |
---|
604 | 0 |
---|
605 | ); |
---|
606 | |
---|
607 | /* rtems_message_queue_delete */ |
---|
608 | |
---|
609 | benchmark_timer_initialize(); |
---|
610 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
611 | (void) rtems_message_queue_delete( id ); |
---|
612 | end_time = benchmark_timer_read(); |
---|
613 | |
---|
614 | put_time( |
---|
615 | "rtems_message_queue_delete", |
---|
616 | end_time, |
---|
617 | OPERATION_COUNT, |
---|
618 | overhead, |
---|
619 | 0 |
---|
620 | ); |
---|
621 | |
---|
622 | /* rtems_message_queue_send */ |
---|
623 | |
---|
624 | benchmark_timer_initialize(); |
---|
625 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
626 | (void) rtems_message_queue_send( id, (long (*)[4])buffer ); |
---|
627 | end_time = benchmark_timer_read(); |
---|
628 | |
---|
629 | put_time( |
---|
630 | "rtems_message_queue_send", |
---|
631 | end_time, |
---|
632 | OPERATION_COUNT, |
---|
633 | overhead, |
---|
634 | 0 |
---|
635 | ); |
---|
636 | |
---|
637 | /* rtems_message_queue_urgent */ |
---|
638 | |
---|
639 | benchmark_timer_initialize(); |
---|
640 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
641 | (void) rtems_message_queue_urgent( id, (long (*)[4])buffer ); |
---|
642 | end_time = benchmark_timer_read(); |
---|
643 | |
---|
644 | put_time( |
---|
645 | "rtems_message_queue_urgent", |
---|
646 | end_time, |
---|
647 | OPERATION_COUNT, |
---|
648 | overhead, |
---|
649 | 0 |
---|
650 | ); |
---|
651 | |
---|
652 | /* rtems_message_queue_broadcast */ |
---|
653 | |
---|
654 | benchmark_timer_initialize(); |
---|
655 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
656 | (void) rtems_message_queue_broadcast( |
---|
657 | id, |
---|
658 | (long (*)[4])buffer, |
---|
659 | &count |
---|
660 | ); |
---|
661 | end_time = benchmark_timer_read(); |
---|
662 | |
---|
663 | put_time( |
---|
664 | "rtems_message_queue_broadcast", |
---|
665 | end_time, |
---|
666 | OPERATION_COUNT, |
---|
667 | overhead, |
---|
668 | 0 |
---|
669 | ); |
---|
670 | |
---|
671 | /* rtems_message_queue_receive */ |
---|
672 | |
---|
673 | benchmark_timer_initialize(); |
---|
674 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
675 | (void) rtems_message_queue_receive( |
---|
676 | id, |
---|
677 | (long (*)[4])buffer, |
---|
678 | RTEMS_DEFAULT_OPTIONS, |
---|
679 | timeout |
---|
680 | ); |
---|
681 | end_time = benchmark_timer_read(); |
---|
682 | |
---|
683 | put_time( |
---|
684 | "rtems_message_queue_receive", |
---|
685 | end_time, |
---|
686 | OPERATION_COUNT, |
---|
687 | overhead, |
---|
688 | 0 |
---|
689 | ); |
---|
690 | |
---|
691 | /* rtems_message_queue_flush */ |
---|
692 | |
---|
693 | benchmark_timer_initialize(); |
---|
694 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
695 | (void) rtems_message_queue_flush( id, &count ); |
---|
696 | end_time = benchmark_timer_read(); |
---|
697 | |
---|
698 | put_time( |
---|
699 | "rtems_message_queue_flush", |
---|
700 | end_time, |
---|
701 | OPERATION_COUNT, |
---|
702 | overhead, |
---|
703 | 0 |
---|
704 | ); |
---|
705 | |
---|
706 | rtems_test_pause(); |
---|
707 | |
---|
708 | /* rtems_event_send */ |
---|
709 | |
---|
710 | benchmark_timer_initialize(); |
---|
711 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
712 | (void) rtems_event_send( id, events ); |
---|
713 | end_time = benchmark_timer_read(); |
---|
714 | |
---|
715 | put_time( |
---|
716 | "rtems_event_send", |
---|
717 | end_time, |
---|
718 | OPERATION_COUNT, |
---|
719 | overhead, |
---|
720 | 0 |
---|
721 | ); |
---|
722 | |
---|
723 | /* rtems_event_receive */ |
---|
724 | |
---|
725 | benchmark_timer_initialize(); |
---|
726 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
727 | (void) rtems_event_receive( |
---|
728 | RTEMS_EVENT_16, |
---|
729 | RTEMS_DEFAULT_OPTIONS, |
---|
730 | timeout, |
---|
731 | &events |
---|
732 | ); |
---|
733 | end_time = benchmark_timer_read(); |
---|
734 | |
---|
735 | put_time( |
---|
736 | "rtems_event_receive", |
---|
737 | end_time, |
---|
738 | OPERATION_COUNT, |
---|
739 | overhead, |
---|
740 | 0 |
---|
741 | ); |
---|
742 | |
---|
743 | /* rtems_signal_catch */ |
---|
744 | |
---|
745 | benchmark_timer_initialize(); |
---|
746 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
747 | (void) rtems_signal_catch( Asr_handler, RTEMS_DEFAULT_MODES ); |
---|
748 | end_time = benchmark_timer_read(); |
---|
749 | |
---|
750 | put_time( |
---|
751 | "rtems_signal_catch", |
---|
752 | end_time, |
---|
753 | OPERATION_COUNT, |
---|
754 | overhead, |
---|
755 | 0 |
---|
756 | ); |
---|
757 | |
---|
758 | /* rtems_signal_send */ |
---|
759 | |
---|
760 | benchmark_timer_initialize(); |
---|
761 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
762 | (void) rtems_signal_send( id, signals ); |
---|
763 | end_time = benchmark_timer_read(); |
---|
764 | |
---|
765 | put_time( |
---|
766 | "rtems_signal_send", |
---|
767 | end_time, |
---|
768 | OPERATION_COUNT, |
---|
769 | overhead, |
---|
770 | 0 |
---|
771 | ); |
---|
772 | |
---|
773 | /* rtems_partition_create */ |
---|
774 | |
---|
775 | benchmark_timer_initialize(); |
---|
776 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
777 | (void) rtems_partition_create( |
---|
778 | name, |
---|
779 | Memory_area, |
---|
780 | 2048, |
---|
781 | 128, |
---|
782 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
783 | &id |
---|
784 | ); |
---|
785 | end_time = benchmark_timer_read(); |
---|
786 | |
---|
787 | put_time( |
---|
788 | "rtems_partition_create", |
---|
789 | end_time, |
---|
790 | OPERATION_COUNT, |
---|
791 | overhead, |
---|
792 | 0 |
---|
793 | ); |
---|
794 | |
---|
795 | /* rtems_partition_ident */ |
---|
796 | |
---|
797 | benchmark_timer_initialize(); |
---|
798 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
799 | (void) rtems_partition_ident( name, RTEMS_SEARCH_ALL_NODES, id ); |
---|
800 | end_time = benchmark_timer_read(); |
---|
801 | |
---|
802 | put_time( |
---|
803 | "rtems_partition_ident", |
---|
804 | end_time, |
---|
805 | OPERATION_COUNT, |
---|
806 | overhead, |
---|
807 | 0 |
---|
808 | ); |
---|
809 | |
---|
810 | /* rtems_partition_delete */ |
---|
811 | |
---|
812 | benchmark_timer_initialize(); |
---|
813 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
814 | (void) rtems_partition_delete( id ); |
---|
815 | end_time = benchmark_timer_read(); |
---|
816 | |
---|
817 | put_time( |
---|
818 | "rtems_partition_delete", |
---|
819 | end_time, |
---|
820 | OPERATION_COUNT, |
---|
821 | overhead, |
---|
822 | 0 |
---|
823 | ); |
---|
824 | |
---|
825 | /* rtems_partition_get_buffer */ |
---|
826 | |
---|
827 | benchmark_timer_initialize(); |
---|
828 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
829 | (void) rtems_partition_get_buffer( id, address_1 ); |
---|
830 | end_time = benchmark_timer_read(); |
---|
831 | |
---|
832 | put_time( |
---|
833 | "rtems_partition_get_buffer", |
---|
834 | end_time, |
---|
835 | OPERATION_COUNT, |
---|
836 | overhead, |
---|
837 | 0 |
---|
838 | ); |
---|
839 | |
---|
840 | /* rtems_partition_return_buffer */ |
---|
841 | |
---|
842 | benchmark_timer_initialize(); |
---|
843 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
844 | (void) rtems_partition_return_buffer( id, address_1 ); |
---|
845 | end_time = benchmark_timer_read(); |
---|
846 | |
---|
847 | put_time( |
---|
848 | "rtems_partition_return_buffer", |
---|
849 | end_time, |
---|
850 | OPERATION_COUNT, |
---|
851 | overhead, |
---|
852 | 0 |
---|
853 | ); |
---|
854 | |
---|
855 | /* rtems_region_create */ |
---|
856 | |
---|
857 | benchmark_timer_initialize(); |
---|
858 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
859 | (void) rtems_region_create( |
---|
860 | name, |
---|
861 | Memory_area, |
---|
862 | 2048, |
---|
863 | 128, |
---|
864 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
865 | &id |
---|
866 | ); |
---|
867 | end_time = benchmark_timer_read(); |
---|
868 | |
---|
869 | put_time( |
---|
870 | "rtems_region_create", |
---|
871 | end_time, |
---|
872 | OPERATION_COUNT, |
---|
873 | overhead, |
---|
874 | 0 |
---|
875 | ); |
---|
876 | |
---|
877 | /* rtems_region_ident */ |
---|
878 | |
---|
879 | benchmark_timer_initialize(); |
---|
880 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
881 | (void) rtems_region_ident( name, id ); |
---|
882 | end_time = benchmark_timer_read(); |
---|
883 | |
---|
884 | put_time( |
---|
885 | "rtems_region_ident", |
---|
886 | end_time, |
---|
887 | OPERATION_COUNT, |
---|
888 | overhead, |
---|
889 | 0 |
---|
890 | ); |
---|
891 | |
---|
892 | /* rtems_region_delete */ |
---|
893 | |
---|
894 | benchmark_timer_initialize(); |
---|
895 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
896 | (void) rtems_region_delete( id ); |
---|
897 | end_time = benchmark_timer_read(); |
---|
898 | |
---|
899 | put_time( |
---|
900 | "rtems_region_delete", |
---|
901 | end_time, |
---|
902 | OPERATION_COUNT, |
---|
903 | overhead, |
---|
904 | 0 |
---|
905 | ); |
---|
906 | |
---|
907 | /* rtems_region_get_segment */ |
---|
908 | |
---|
909 | benchmark_timer_initialize(); |
---|
910 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
911 | (void) rtems_region_get_segment( |
---|
912 | id, |
---|
913 | 243, |
---|
914 | RTEMS_DEFAULT_OPTIONS, |
---|
915 | timeout, |
---|
916 | &address_1 |
---|
917 | ); |
---|
918 | end_time = benchmark_timer_read(); |
---|
919 | |
---|
920 | put_time( |
---|
921 | "rtems_region_get_segment", |
---|
922 | end_time, |
---|
923 | OPERATION_COUNT, |
---|
924 | overhead, |
---|
925 | 0 |
---|
926 | ); |
---|
927 | |
---|
928 | /* rtems_region_return_segment */ |
---|
929 | |
---|
930 | benchmark_timer_initialize(); |
---|
931 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
932 | (void) rtems_region_return_segment( id, address_1 ); |
---|
933 | end_time = benchmark_timer_read(); |
---|
934 | |
---|
935 | put_time( |
---|
936 | "rtems_region_return_segment", |
---|
937 | end_time, |
---|
938 | OPERATION_COUNT, |
---|
939 | overhead, |
---|
940 | 0 |
---|
941 | ); |
---|
942 | |
---|
943 | /* rtems_port_create */ |
---|
944 | |
---|
945 | benchmark_timer_initialize(); |
---|
946 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
947 | (void) rtems_port_create( |
---|
948 | name, |
---|
949 | Internal_port_area, |
---|
950 | External_port_area, |
---|
951 | 0xff, |
---|
952 | &id |
---|
953 | ); |
---|
954 | end_time = benchmark_timer_read(); |
---|
955 | |
---|
956 | put_time( |
---|
957 | "rtems_port_create", |
---|
958 | end_time, |
---|
959 | OPERATION_COUNT, |
---|
960 | overhead, |
---|
961 | 0 |
---|
962 | ); |
---|
963 | |
---|
964 | /* rtems_port_ident */ |
---|
965 | |
---|
966 | benchmark_timer_initialize(); |
---|
967 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
968 | (void) rtems_port_ident( name, id ); |
---|
969 | end_time = benchmark_timer_read(); |
---|
970 | |
---|
971 | put_time( |
---|
972 | "rtems_port_ident", |
---|
973 | end_time, |
---|
974 | OPERATION_COUNT, |
---|
975 | overhead, |
---|
976 | 0 |
---|
977 | ); |
---|
978 | |
---|
979 | /* rtems_port_delete */ |
---|
980 | |
---|
981 | benchmark_timer_initialize(); |
---|
982 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
983 | (void) rtems_port_delete( id ); |
---|
984 | end_time = benchmark_timer_read(); |
---|
985 | |
---|
986 | put_time( |
---|
987 | "rtems_port_delete", |
---|
988 | end_time, |
---|
989 | OPERATION_COUNT, |
---|
990 | overhead, |
---|
991 | 0 |
---|
992 | ); |
---|
993 | |
---|
994 | /* rtems_port_external_to_internal */ |
---|
995 | |
---|
996 | benchmark_timer_initialize(); |
---|
997 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
998 | (void) rtems_port_external_to_internal( |
---|
999 | id, |
---|
1000 | &External_port_area[ 7 ], |
---|
1001 | address_1 |
---|
1002 | ); |
---|
1003 | end_time = benchmark_timer_read(); |
---|
1004 | |
---|
1005 | put_time( |
---|
1006 | "rtems_port_external_to_internal", |
---|
1007 | end_time, |
---|
1008 | OPERATION_COUNT, |
---|
1009 | overhead, |
---|
1010 | 0 |
---|
1011 | ); |
---|
1012 | |
---|
1013 | /* rtems_port_internal_to_external */ |
---|
1014 | |
---|
1015 | benchmark_timer_initialize(); |
---|
1016 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1017 | (void) rtems_port_internal_to_external( |
---|
1018 | id, |
---|
1019 | &Internal_port_area[ 7 ], |
---|
1020 | address_1 |
---|
1021 | ); |
---|
1022 | end_time = benchmark_timer_read(); |
---|
1023 | |
---|
1024 | put_time( |
---|
1025 | "rtems_port_internal_to_external", |
---|
1026 | end_time, |
---|
1027 | OPERATION_COUNT, |
---|
1028 | overhead, |
---|
1029 | 0 |
---|
1030 | ); |
---|
1031 | |
---|
1032 | rtems_test_pause(); |
---|
1033 | |
---|
1034 | /* rtems_io_initialize */ |
---|
1035 | |
---|
1036 | benchmark_timer_initialize(); |
---|
1037 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1038 | (void) rtems_io_initialize( |
---|
1039 | major, |
---|
1040 | minor, |
---|
1041 | address_1, |
---|
1042 | &io_result |
---|
1043 | ); |
---|
1044 | end_time = benchmark_timer_read(); |
---|
1045 | |
---|
1046 | put_time( |
---|
1047 | "rtems_io_initialize", |
---|
1048 | end_time, |
---|
1049 | OPERATION_COUNT, |
---|
1050 | overhead, |
---|
1051 | 0 |
---|
1052 | ); |
---|
1053 | |
---|
1054 | /* rtems_io_open */ |
---|
1055 | |
---|
1056 | benchmark_timer_initialize(); |
---|
1057 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1058 | (void) rtems_io_open( |
---|
1059 | major, |
---|
1060 | minor, |
---|
1061 | address_1, |
---|
1062 | &io_result |
---|
1063 | ); |
---|
1064 | end_time = benchmark_timer_read(); |
---|
1065 | |
---|
1066 | put_time( |
---|
1067 | "rtems_io_open", |
---|
1068 | end_time, |
---|
1069 | OPERATION_COUNT, |
---|
1070 | overhead, |
---|
1071 | 0 |
---|
1072 | ); |
---|
1073 | |
---|
1074 | /* rtems_io_close */ |
---|
1075 | |
---|
1076 | benchmark_timer_initialize(); |
---|
1077 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1078 | (void) rtems_io_close( |
---|
1079 | major, |
---|
1080 | minor, |
---|
1081 | address_1, |
---|
1082 | &io_result |
---|
1083 | ); |
---|
1084 | end_time = benchmark_timer_read(); |
---|
1085 | |
---|
1086 | put_time( |
---|
1087 | "rtems_io_close", |
---|
1088 | end_time, |
---|
1089 | OPERATION_COUNT, |
---|
1090 | overhead, |
---|
1091 | 0 |
---|
1092 | ); |
---|
1093 | |
---|
1094 | /* rtems_io_read */ |
---|
1095 | |
---|
1096 | benchmark_timer_initialize(); |
---|
1097 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1098 | (void) rtems_io_read( |
---|
1099 | major, |
---|
1100 | minor, |
---|
1101 | address_1, |
---|
1102 | &io_result |
---|
1103 | ); |
---|
1104 | end_time = benchmark_timer_read(); |
---|
1105 | |
---|
1106 | put_time( |
---|
1107 | "rtems_io_read", |
---|
1108 | end_time, |
---|
1109 | OPERATION_COUNT, |
---|
1110 | overhead, |
---|
1111 | 0 |
---|
1112 | ); |
---|
1113 | |
---|
1114 | /* rtems_io_write */ |
---|
1115 | |
---|
1116 | benchmark_timer_initialize(); |
---|
1117 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1118 | (void) rtems_io_write( |
---|
1119 | major, |
---|
1120 | minor, |
---|
1121 | address_1, |
---|
1122 | &io_result |
---|
1123 | ); |
---|
1124 | end_time = benchmark_timer_read(); |
---|
1125 | |
---|
1126 | put_time( |
---|
1127 | "rtems_io_write", |
---|
1128 | end_time, |
---|
1129 | OPERATION_COUNT, |
---|
1130 | overhead, |
---|
1131 | 0 |
---|
1132 | ); |
---|
1133 | |
---|
1134 | /* rtems_io_control */ |
---|
1135 | |
---|
1136 | benchmark_timer_initialize(); |
---|
1137 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1138 | (void) rtems_io_control( |
---|
1139 | major, |
---|
1140 | minor, |
---|
1141 | address_1, |
---|
1142 | &io_result |
---|
1143 | ); |
---|
1144 | end_time = benchmark_timer_read(); |
---|
1145 | |
---|
1146 | put_time( |
---|
1147 | "rtems_io_control", |
---|
1148 | end_time, |
---|
1149 | OPERATION_COUNT, |
---|
1150 | overhead, |
---|
1151 | 0 |
---|
1152 | ); |
---|
1153 | |
---|
1154 | /* rtems_fatal_error_occurred */ |
---|
1155 | |
---|
1156 | benchmark_timer_initialize(); |
---|
1157 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1158 | (void) rtems_fatal_error_occurred( error ); |
---|
1159 | end_time = benchmark_timer_read(); |
---|
1160 | |
---|
1161 | put_time( |
---|
1162 | "rtems_fatal_error_occurred", |
---|
1163 | end_time, |
---|
1164 | OPERATION_COUNT, |
---|
1165 | overhead, |
---|
1166 | 0 |
---|
1167 | ); |
---|
1168 | |
---|
1169 | /* rtems_rate_monotonic_create */ |
---|
1170 | |
---|
1171 | benchmark_timer_initialize(); |
---|
1172 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1173 | (void) rtems_rate_monotonic_create( name, &id ); |
---|
1174 | end_time = benchmark_timer_read(); |
---|
1175 | |
---|
1176 | put_time( |
---|
1177 | "rtems_rate_monotonic_create", |
---|
1178 | end_time, |
---|
1179 | OPERATION_COUNT, |
---|
1180 | overhead, |
---|
1181 | 0 |
---|
1182 | ); |
---|
1183 | |
---|
1184 | /* rtems_rate_monotonic_ident */ |
---|
1185 | |
---|
1186 | benchmark_timer_initialize(); |
---|
1187 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1188 | (void) rtems_rate_monotonic_ident( name, id ); |
---|
1189 | end_time = benchmark_timer_read(); |
---|
1190 | |
---|
1191 | put_time( |
---|
1192 | "rtems_rate_monotonic_ident", |
---|
1193 | end_time, |
---|
1194 | OPERATION_COUNT, |
---|
1195 | overhead, |
---|
1196 | 0 |
---|
1197 | ); |
---|
1198 | |
---|
1199 | /* rtems_rate_monotonic_delete */ |
---|
1200 | |
---|
1201 | benchmark_timer_initialize(); |
---|
1202 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1203 | (void) rtems_rate_monotonic_delete( id ); |
---|
1204 | end_time = benchmark_timer_read(); |
---|
1205 | |
---|
1206 | put_time( |
---|
1207 | "rtems_rate_monotonic_delete", |
---|
1208 | end_time, |
---|
1209 | OPERATION_COUNT, |
---|
1210 | overhead, |
---|
1211 | 0 |
---|
1212 | ); |
---|
1213 | |
---|
1214 | /* rtems_rate_monotonic_cancel */ |
---|
1215 | |
---|
1216 | benchmark_timer_initialize(); |
---|
1217 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1218 | (void) rtems_rate_monotonic_cancel( id ); |
---|
1219 | end_time = benchmark_timer_read(); |
---|
1220 | |
---|
1221 | put_time( |
---|
1222 | "rtems_rate_monotonic_cancel", |
---|
1223 | end_time, |
---|
1224 | OPERATION_COUNT, |
---|
1225 | overhead, |
---|
1226 | 0 |
---|
1227 | ); |
---|
1228 | |
---|
1229 | /* rtems_rate_monotonic_period */ |
---|
1230 | |
---|
1231 | benchmark_timer_initialize(); |
---|
1232 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1233 | (void) rtems_rate_monotonic_period( id, timeout ); |
---|
1234 | end_time = benchmark_timer_read(); |
---|
1235 | |
---|
1236 | put_time( |
---|
1237 | "rtems_rate_monotonic_period", |
---|
1238 | end_time, |
---|
1239 | OPERATION_COUNT, |
---|
1240 | overhead, |
---|
1241 | 0 |
---|
1242 | ); |
---|
1243 | |
---|
1244 | /* rtems_multiprocessing_announce */ |
---|
1245 | |
---|
1246 | benchmark_timer_initialize(); |
---|
1247 | for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) |
---|
1248 | (void) rtems_multiprocessing_announce(); |
---|
1249 | end_time = benchmark_timer_read(); |
---|
1250 | |
---|
1251 | put_time( |
---|
1252 | "rtems_multiprocessing_announce", |
---|
1253 | end_time, |
---|
1254 | OPERATION_COUNT, |
---|
1255 | overhead, |
---|
1256 | 0 |
---|
1257 | ); |
---|
1258 | |
---|
1259 | puts( "*** END OF TIME OVERHEAD ***" ); |
---|
1260 | |
---|
1261 | rtems_test_exit( 0 ); |
---|
1262 | } |
---|