[ac7d5ef0] | 1 | /* |
---|
| 2 | * |
---|
[60b791ad] | 3 | * COPYRIGHT (c) 1989-1998. |
---|
[ac7d5ef0] | 4 | * On-Line Applications Research Corporation (OAR). |
---|
[03f2154e] | 5 | * Copyright assigned to U.S. Government, 1994. |
---|
[ac7d5ef0] | 6 | * |
---|
[98e4ebf5] | 7 | * The license and distribution terms for this file may be |
---|
| 8 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 9 | * http://www.OARcorp.com/rtems/license.html. |
---|
[ac7d5ef0] | 10 | * |
---|
[3235ad9] | 11 | * $Id$ |
---|
[ac7d5ef0] | 12 | */ |
---|
| 13 | |
---|
[3a4ae6c] | 14 | #define TEST_INIT |
---|
[e6424462] | 15 | #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ |
---|
[ac7d5ef0] | 16 | #include <rtems.h> |
---|
| 17 | #include "system.h" |
---|
| 18 | #include "fptest.h" |
---|
[459f770] | 19 | #include <coverhd.h> |
---|
| 20 | #include <tmacros.h> |
---|
| 21 | #include <timesys.h> |
---|
[ac7d5ef0] | 22 | |
---|
| 23 | |
---|
| 24 | /* TEST DATA */ |
---|
| 25 | rtems_id Semaphore_id; |
---|
| 26 | |
---|
| 27 | Objects_Locations location; /* uses internal RTEMS type */ |
---|
| 28 | |
---|
| 29 | Thread_Control *Middle_tcb; /* uses internal RTEMS type */ |
---|
| 30 | |
---|
[7950309] | 31 | Thread_Control *Low_tcb; /* uses internal RTEMS type */ |
---|
| 32 | |
---|
[ac7d5ef0] | 33 | rtems_task High_task( |
---|
| 34 | rtems_task_argument argument |
---|
| 35 | ); |
---|
| 36 | |
---|
| 37 | rtems_task Middle_task( |
---|
| 38 | rtems_task_argument argument |
---|
| 39 | ); |
---|
| 40 | |
---|
| 41 | rtems_task Low_task( |
---|
| 42 | rtems_task_argument argument |
---|
| 43 | ); |
---|
| 44 | |
---|
| 45 | rtems_task Floating_point_task_1( |
---|
| 46 | rtems_task_argument argument |
---|
| 47 | ); |
---|
| 48 | |
---|
| 49 | rtems_task Floating_point_task_2( |
---|
| 50 | rtems_task_argument argument |
---|
| 51 | ); |
---|
| 52 | |
---|
| 53 | void complete_test( void ); |
---|
| 54 | |
---|
| 55 | rtems_task null_task( |
---|
| 56 | rtems_task_argument argument |
---|
| 57 | ) |
---|
| 58 | { |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | rtems_task Init( |
---|
| 62 | rtems_task_argument argument |
---|
| 63 | ) |
---|
| 64 | { |
---|
| 65 | rtems_unsigned32 index; |
---|
| 66 | rtems_id task_id; |
---|
| 67 | rtems_status_code status; |
---|
| 68 | |
---|
[3a4ae6c] | 69 | Print_Warning(); |
---|
| 70 | |
---|
[ac7d5ef0] | 71 | puts( "\n\n*** TIME TEST 26 ***" ); |
---|
| 72 | |
---|
| 73 | status = rtems_task_create( |
---|
| 74 | rtems_build_name( 'F', 'P', '1', ' ' ), |
---|
| 75 | 201, |
---|
[3652ad35] | 76 | RTEMS_MINIMUM_STACK_SIZE, |
---|
[ac7d5ef0] | 77 | RTEMS_DEFAULT_MODES, |
---|
| 78 | RTEMS_FLOATING_POINT, |
---|
| 79 | &task_id |
---|
| 80 | ); |
---|
| 81 | directive_failed( status, "rtems_task_create of FP1" ); |
---|
| 82 | |
---|
| 83 | status = rtems_task_start( task_id, Floating_point_task_1, 0 ); |
---|
| 84 | directive_failed( status, "rtems_task_start of FP1" ); |
---|
| 85 | |
---|
| 86 | status = rtems_task_create( |
---|
| 87 | rtems_build_name( 'F', 'P', '2', ' ' ), |
---|
| 88 | 202, |
---|
[3652ad35] | 89 | RTEMS_MINIMUM_STACK_SIZE, |
---|
[ac7d5ef0] | 90 | RTEMS_DEFAULT_MODES, |
---|
| 91 | RTEMS_FLOATING_POINT, |
---|
| 92 | &task_id |
---|
| 93 | ); |
---|
| 94 | directive_failed( status, "rtems_task_create of FP2" ); |
---|
| 95 | |
---|
| 96 | status = rtems_task_start( task_id, Floating_point_task_2, 0 ); |
---|
| 97 | directive_failed( status, "rtems_task_start of FP2" ); |
---|
| 98 | |
---|
| 99 | status = rtems_task_create( |
---|
| 100 | rtems_build_name( 'L', 'O', 'W', ' ' ), |
---|
| 101 | 200, |
---|
[3652ad35] | 102 | RTEMS_MINIMUM_STACK_SIZE, |
---|
[ac7d5ef0] | 103 | RTEMS_DEFAULT_MODES, |
---|
| 104 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
| 105 | &task_id |
---|
| 106 | ); |
---|
| 107 | directive_failed( status, "rtems_task_create of LOW" ); |
---|
| 108 | |
---|
| 109 | status = rtems_task_start( task_id, Low_task, 0 ); |
---|
| 110 | directive_failed( status, "rtems_task_start of LOW" ); |
---|
| 111 | |
---|
| 112 | status = rtems_task_create( |
---|
| 113 | rtems_build_name( 'M', 'I', 'D', ' ' ), |
---|
| 114 | 128, |
---|
[3652ad35] | 115 | RTEMS_MINIMUM_STACK_SIZE, |
---|
[ac7d5ef0] | 116 | RTEMS_DEFAULT_MODES, |
---|
| 117 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
| 118 | &task_id |
---|
| 119 | ); |
---|
| 120 | directive_failed( status, "rtems_task_create of MIDDLE" ); |
---|
| 121 | |
---|
| 122 | status = rtems_task_start( task_id, Middle_task, 0 ); |
---|
| 123 | directive_failed( status, "rtems_task_start of MIDDLE" ); |
---|
| 124 | |
---|
| 125 | status = rtems_task_create( |
---|
| 126 | rtems_build_name( 'H', 'I', 'G', 'H' ), |
---|
| 127 | 5, |
---|
[3652ad35] | 128 | RTEMS_MINIMUM_STACK_SIZE, |
---|
[ac7d5ef0] | 129 | RTEMS_DEFAULT_MODES, |
---|
| 130 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
| 131 | &task_id |
---|
| 132 | ); |
---|
| 133 | directive_failed( status, "rtems_task_create of HIGH" ); |
---|
| 134 | |
---|
| 135 | status = rtems_task_start( task_id, High_task, 0 ); |
---|
| 136 | directive_failed( status, "rtems_task_start of HIGH" ); |
---|
| 137 | |
---|
| 138 | status = rtems_semaphore_create( |
---|
| 139 | rtems_build_name( 'S', 'E', 'M', '1' ), |
---|
| 140 | OPERATION_COUNT, |
---|
| 141 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
[7f6a24ab] | 142 | RTEMS_NO_PRIORITY, |
---|
[ac7d5ef0] | 143 | &Semaphore_id |
---|
| 144 | ); |
---|
| 145 | directive_failed( status, "rtems_semaphore_create" ); |
---|
| 146 | |
---|
| 147 | for ( index = 1 ; index <= OPERATION_COUNT ; index++ ) { |
---|
| 148 | status = rtems_task_create( |
---|
| 149 | rtems_build_name( 'N', 'U', 'L', 'L' ), |
---|
| 150 | 254, |
---|
[3652ad35] | 151 | RTEMS_MINIMUM_STACK_SIZE, |
---|
[ac7d5ef0] | 152 | RTEMS_DEFAULT_MODES, |
---|
| 153 | RTEMS_DEFAULT_ATTRIBUTES, |
---|
| 154 | &task_id |
---|
| 155 | ); |
---|
| 156 | directive_failed( status, "rtems_task_create LOOP" ); |
---|
| 157 | |
---|
| 158 | status = rtems_task_start( task_id, null_task, 0 ); |
---|
| 159 | directive_failed( status, "rtems_task_start LOOP" ); |
---|
| 160 | } |
---|
| 161 | |
---|
| 162 | status = rtems_task_delete( RTEMS_SELF ); |
---|
| 163 | directive_failed( status, "rtems_task_delete of RTEMS_SELF" ); |
---|
| 164 | } |
---|
| 165 | |
---|
| 166 | rtems_task High_task( |
---|
| 167 | rtems_task_argument argument |
---|
| 168 | ) |
---|
| 169 | { |
---|
[7950309] | 170 | rtems_interrupt_level level; |
---|
| 171 | |
---|
| 172 | Timer_initialize(); |
---|
| 173 | rtems_interrupt_disable( level ); |
---|
| 174 | end_time = Read_timer(); |
---|
| 175 | |
---|
| 176 | put_time( |
---|
[5c491aef] | 177 | "_ISR_Disable", |
---|
[7950309] | 178 | end_time, |
---|
| 179 | 1, |
---|
| 180 | 0, |
---|
| 181 | 0 |
---|
| 182 | ); |
---|
| 183 | |
---|
| 184 | Timer_initialize(); |
---|
| 185 | rtems_interrupt_flash( level ); |
---|
| 186 | end_time = Read_timer(); |
---|
| 187 | |
---|
| 188 | put_time( |
---|
[5c491aef] | 189 | "_ISR_Flash", |
---|
[7950309] | 190 | end_time, |
---|
| 191 | 1, |
---|
| 192 | 0, |
---|
| 193 | 0 |
---|
| 194 | ); |
---|
| 195 | |
---|
| 196 | Timer_initialize(); |
---|
| 197 | rtems_interrupt_enable( level ); |
---|
| 198 | end_time = Read_timer(); |
---|
| 199 | |
---|
| 200 | put_time( |
---|
[5c491aef] | 201 | "_ISR_Enable", |
---|
[7950309] | 202 | end_time, |
---|
| 203 | 1, |
---|
| 204 | 0, |
---|
| 205 | 0 |
---|
| 206 | ); |
---|
| 207 | |
---|
[ac7d5ef0] | 208 | Timer_initialize(); |
---|
| 209 | _Thread_Disable_dispatch(); |
---|
| 210 | end_time = Read_timer(); |
---|
| 211 | |
---|
| 212 | put_time( |
---|
[5c491aef] | 213 | "_Thread_Disable_dispatch", |
---|
[ac7d5ef0] | 214 | end_time, |
---|
| 215 | 1, |
---|
| 216 | 0, |
---|
| 217 | 0 |
---|
| 218 | ); |
---|
| 219 | |
---|
| 220 | Timer_initialize(); |
---|
| 221 | _Thread_Enable_dispatch(); |
---|
| 222 | end_time = Read_timer(); |
---|
| 223 | |
---|
| 224 | put_time( |
---|
[5c491aef] | 225 | "_Thread_Enable_dispatch", |
---|
[ac7d5ef0] | 226 | end_time, |
---|
| 227 | 1, |
---|
| 228 | 0, |
---|
| 229 | 0 |
---|
| 230 | ); |
---|
| 231 | |
---|
| 232 | Timer_initialize(); |
---|
| 233 | _Thread_Set_state( _Thread_Executing, STATES_SUSPENDED ); |
---|
| 234 | end_time = Read_timer(); |
---|
| 235 | |
---|
| 236 | put_time( |
---|
[5c491aef] | 237 | "_Thread_Set_state", |
---|
[ac7d5ef0] | 238 | end_time, |
---|
| 239 | 1, |
---|
| 240 | 0, |
---|
| 241 | 0 |
---|
| 242 | ); |
---|
| 243 | |
---|
| 244 | _Context_Switch_necessary = TRUE; |
---|
| 245 | |
---|
| 246 | Timer_initialize(); |
---|
| 247 | _Thread_Dispatch(); /* dispatches Middle_task */ |
---|
| 248 | } |
---|
| 249 | |
---|
| 250 | rtems_task Middle_task( |
---|
| 251 | rtems_task_argument argument |
---|
| 252 | ) |
---|
| 253 | { |
---|
| 254 | end_time = Read_timer(); |
---|
| 255 | |
---|
| 256 | put_time( |
---|
[5c491aef] | 257 | "_Thread_Disptach (NO FP)", |
---|
[ac7d5ef0] | 258 | end_time, |
---|
| 259 | 1, |
---|
| 260 | 0, |
---|
| 261 | 0 |
---|
| 262 | ); |
---|
| 263 | |
---|
| 264 | _Thread_Set_state( _Thread_Executing, STATES_SUSPENDED ); |
---|
| 265 | |
---|
| 266 | Middle_tcb = _Thread_Executing; |
---|
| 267 | |
---|
| 268 | _Thread_Executing = |
---|
| 269 | (Thread_Control *) _Thread_Ready_chain[200].first; |
---|
| 270 | |
---|
| 271 | /* do not force context switch */ |
---|
| 272 | |
---|
| 273 | _Context_Switch_necessary = FALSE; |
---|
| 274 | |
---|
[459f770] | 275 | _Thread_Disable_dispatch(); |
---|
| 276 | |
---|
[ac7d5ef0] | 277 | Timer_initialize(); |
---|
| 278 | _Context_Switch( &Middle_tcb->Registers, &_Thread_Executing->Registers ); |
---|
[7950309] | 279 | |
---|
| 280 | Timer_initialize(); |
---|
| 281 | _Context_Switch(&Middle_tcb->Registers, &Low_tcb->Registers); |
---|
[ac7d5ef0] | 282 | } |
---|
| 283 | |
---|
| 284 | rtems_task Low_task( |
---|
| 285 | rtems_task_argument argument |
---|
| 286 | ) |
---|
| 287 | { |
---|
| 288 | Thread_Control *executing; |
---|
| 289 | |
---|
| 290 | end_time = Read_timer(); |
---|
| 291 | |
---|
| 292 | put_time( |
---|
[5c491aef] | 293 | "context switch: no floating point contexts", |
---|
[ac7d5ef0] | 294 | end_time, |
---|
| 295 | 1, |
---|
| 296 | 0, |
---|
| 297 | 0 |
---|
| 298 | ); |
---|
| 299 | |
---|
| 300 | executing = _Thread_Executing; |
---|
| 301 | |
---|
[7950309] | 302 | Low_tcb = executing; |
---|
| 303 | |
---|
| 304 | Timer_initialize(); |
---|
| 305 | _Context_Switch( &executing->Registers, &executing->Registers ); |
---|
| 306 | |
---|
| 307 | end_time = Read_timer(); |
---|
| 308 | |
---|
| 309 | put_time( |
---|
[5c491aef] | 310 | "context switch: self", |
---|
[7950309] | 311 | end_time, |
---|
| 312 | 1, |
---|
| 313 | 0, |
---|
| 314 | 0 |
---|
| 315 | ); |
---|
| 316 | |
---|
| 317 | _Context_Switch(&executing->Registers, &Middle_tcb->Registers); |
---|
| 318 | |
---|
| 319 | end_time = Read_timer(); |
---|
| 320 | |
---|
| 321 | put_time( |
---|
[5c491aef] | 322 | "context switch: to another task", |
---|
[7950309] | 323 | end_time, |
---|
| 324 | 1, |
---|
| 325 | 0, |
---|
| 326 | 0 |
---|
| 327 | ); |
---|
| 328 | |
---|
[ac7d5ef0] | 329 | _Thread_Executing = |
---|
| 330 | (Thread_Control *) _Thread_Ready_chain[201].first; |
---|
| 331 | |
---|
| 332 | /* do not force context switch */ |
---|
| 333 | |
---|
| 334 | _Context_Switch_necessary = FALSE; |
---|
| 335 | |
---|
[459f770] | 336 | _Thread_Disable_dispatch(); |
---|
| 337 | |
---|
[ac7d5ef0] | 338 | Timer_initialize(); |
---|
| 339 | _Context_Restore_fp( &_Thread_Executing->fp_context ); |
---|
| 340 | _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); |
---|
| 341 | } |
---|
| 342 | |
---|
| 343 | rtems_task Floating_point_task_1( |
---|
| 344 | rtems_task_argument argument |
---|
| 345 | ) |
---|
| 346 | { |
---|
| 347 | Thread_Control *executing; |
---|
| 348 | FP_DECLARE; |
---|
| 349 | |
---|
| 350 | end_time = Read_timer(); |
---|
| 351 | |
---|
| 352 | put_time( |
---|
[5c491aef] | 353 | "fp context switch: restore 1st FP task", |
---|
[ac7d5ef0] | 354 | end_time, |
---|
| 355 | 1, |
---|
| 356 | 0, |
---|
| 357 | 0 |
---|
| 358 | ); |
---|
| 359 | |
---|
| 360 | executing = _Thread_Executing; |
---|
| 361 | |
---|
| 362 | _Thread_Executing = |
---|
| 363 | (Thread_Control *) _Thread_Ready_chain[202].first; |
---|
| 364 | |
---|
| 365 | /* do not force context switch */ |
---|
| 366 | |
---|
| 367 | _Context_Switch_necessary = FALSE; |
---|
| 368 | |
---|
[459f770] | 369 | _Thread_Disable_dispatch(); |
---|
| 370 | |
---|
[ac7d5ef0] | 371 | Timer_initialize(); |
---|
| 372 | _Context_Save_fp( &executing->fp_context ); |
---|
| 373 | _Context_Restore_fp( &_Thread_Executing->fp_context ); |
---|
| 374 | _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); |
---|
| 375 | /* switch to Floating_point_task_2 */ |
---|
| 376 | |
---|
| 377 | end_time = Read_timer(); |
---|
| 378 | |
---|
| 379 | put_time( |
---|
[5c491aef] | 380 | "fp context switch: save idle, restore initialized", |
---|
[ac7d5ef0] | 381 | end_time, |
---|
| 382 | 1, |
---|
| 383 | 0, |
---|
| 384 | 0 |
---|
| 385 | ); |
---|
| 386 | |
---|
| 387 | FP_LOAD( 1.0 ); |
---|
| 388 | |
---|
| 389 | executing = _Thread_Executing; |
---|
| 390 | |
---|
| 391 | _Thread_Executing = |
---|
| 392 | (Thread_Control *) _Thread_Ready_chain[202].first; |
---|
| 393 | |
---|
| 394 | /* do not force context switch */ |
---|
| 395 | |
---|
| 396 | _Context_Switch_necessary = FALSE; |
---|
| 397 | |
---|
[459f770] | 398 | _Thread_Disable_dispatch(); |
---|
| 399 | |
---|
[ac7d5ef0] | 400 | Timer_initialize(); |
---|
| 401 | _Context_Save_fp( &executing->fp_context ); |
---|
| 402 | _Context_Restore_fp( &_Thread_Executing->fp_context ); |
---|
| 403 | _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); |
---|
| 404 | /* switch to Floating_point_task_2 */ |
---|
| 405 | } |
---|
| 406 | |
---|
| 407 | rtems_task Floating_point_task_2( |
---|
| 408 | rtems_task_argument argument |
---|
| 409 | ) |
---|
| 410 | { |
---|
| 411 | Thread_Control *executing; |
---|
| 412 | FP_DECLARE; |
---|
| 413 | |
---|
| 414 | end_time = Read_timer(); |
---|
| 415 | |
---|
| 416 | put_time( |
---|
[5c491aef] | 417 | "fp context switch: save idle, restore idle", |
---|
[ac7d5ef0] | 418 | end_time, |
---|
| 419 | 1, |
---|
| 420 | 0, |
---|
| 421 | 0 |
---|
| 422 | ); |
---|
| 423 | |
---|
| 424 | executing = _Thread_Executing; |
---|
| 425 | |
---|
| 426 | _Thread_Executing = |
---|
| 427 | (Thread_Control *) _Thread_Ready_chain[201].first; |
---|
| 428 | |
---|
| 429 | FP_LOAD( 1.0 ); |
---|
| 430 | |
---|
| 431 | /* do not force context switch */ |
---|
| 432 | |
---|
| 433 | _Context_Switch_necessary = FALSE; |
---|
| 434 | |
---|
[459f770] | 435 | _Thread_Disable_dispatch(); |
---|
| 436 | |
---|
[ac7d5ef0] | 437 | Timer_initialize(); |
---|
| 438 | _Context_Save_fp( &executing->fp_context ); |
---|
| 439 | _Context_Restore_fp( &_Thread_Executing->fp_context ); |
---|
| 440 | _Context_Switch( &executing->Registers, &_Thread_Executing->Registers ); |
---|
| 441 | /* switch to Floating_point_task_1 */ |
---|
| 442 | |
---|
| 443 | end_time = Read_timer(); |
---|
| 444 | |
---|
| 445 | put_time( |
---|
[5c491aef] | 446 | "fp context switch: save initialized, restore initialized", |
---|
[ac7d5ef0] | 447 | end_time, |
---|
| 448 | 1, |
---|
| 449 | 0, |
---|
| 450 | 0 |
---|
| 451 | ); |
---|
| 452 | |
---|
| 453 | complete_test(); |
---|
| 454 | } |
---|
| 455 | |
---|
| 456 | void complete_test( void ) |
---|
| 457 | { |
---|
| 458 | rtems_unsigned32 index; |
---|
| 459 | rtems_id task_id; |
---|
| 460 | |
---|
| 461 | Timer_initialize(); |
---|
| 462 | _Thread_Resume( Middle_tcb ); |
---|
| 463 | end_time = Read_timer(); |
---|
| 464 | |
---|
| 465 | put_time( |
---|
[5c491aef] | 466 | "_Thread_Resume", |
---|
[ac7d5ef0] | 467 | end_time, |
---|
| 468 | 1, |
---|
| 469 | 0, |
---|
| 470 | 0 |
---|
| 471 | ); |
---|
| 472 | |
---|
| 473 | _Thread_Set_state( Middle_tcb, STATES_WAITING_FOR_MESSAGE ); |
---|
| 474 | |
---|
| 475 | Timer_initialize(); |
---|
| 476 | _Thread_Unblock( Middle_tcb ); |
---|
| 477 | end_time = Read_timer(); |
---|
| 478 | |
---|
| 479 | put_time( |
---|
[5c491aef] | 480 | "_Thread_Unblock", |
---|
[ac7d5ef0] | 481 | end_time, |
---|
| 482 | 1, |
---|
| 483 | 0, |
---|
| 484 | 0 |
---|
| 485 | ); |
---|
| 486 | |
---|
| 487 | _Thread_Set_state( Middle_tcb, STATES_WAITING_FOR_MESSAGE ); |
---|
| 488 | |
---|
| 489 | Timer_initialize(); |
---|
| 490 | _Thread_Ready( Middle_tcb ); |
---|
| 491 | end_time = Read_timer(); |
---|
| 492 | |
---|
| 493 | put_time( |
---|
[5c491aef] | 494 | "_Thread_Ready", |
---|
[ac7d5ef0] | 495 | end_time, |
---|
| 496 | 1, |
---|
| 497 | 0, |
---|
| 498 | 0 |
---|
| 499 | ); |
---|
| 500 | |
---|
| 501 | Timer_initialize(); |
---|
| 502 | for ( index=1 ; index <= OPERATION_COUNT ; index++ ) |
---|
| 503 | (void) Empty_function(); |
---|
| 504 | overhead = Read_timer(); |
---|
| 505 | |
---|
| 506 | task_id = Middle_tcb->Object.id; |
---|
| 507 | |
---|
| 508 | Timer_initialize(); |
---|
| 509 | for ( index=1 ; index <= OPERATION_COUNT ; index++ ) |
---|
| 510 | (void) _Thread_Get( task_id, &location ); |
---|
| 511 | end_time = Read_timer(); |
---|
| 512 | |
---|
| 513 | put_time( |
---|
[5c491aef] | 514 | "_Thread_Get", |
---|
[ac7d5ef0] | 515 | end_time, |
---|
| 516 | OPERATION_COUNT, |
---|
| 517 | 0, |
---|
| 518 | 0 |
---|
| 519 | ); |
---|
| 520 | |
---|
| 521 | Timer_initialize(); |
---|
| 522 | for ( index=1 ; index <= OPERATION_COUNT ; index++ ) |
---|
| 523 | (void) _Semaphore_Get( Semaphore_id, &location ); |
---|
| 524 | end_time = Read_timer(); |
---|
| 525 | |
---|
| 526 | put_time( |
---|
[5c491aef] | 527 | "_Semaphore_Get", |
---|
[ac7d5ef0] | 528 | end_time, |
---|
| 529 | OPERATION_COUNT, |
---|
| 530 | 0, |
---|
| 531 | 0 |
---|
| 532 | ); |
---|
| 533 | |
---|
| 534 | Timer_initialize(); |
---|
| 535 | for ( index=1 ; index <= OPERATION_COUNT ; index++ ) |
---|
| 536 | (void) _Thread_Get( 0x3, &location ); |
---|
| 537 | end_time = Read_timer(); |
---|
| 538 | |
---|
| 539 | put_time( |
---|
[5c491aef] | 540 | "_Thread_Get: invalid id", |
---|
[ac7d5ef0] | 541 | end_time, |
---|
| 542 | OPERATION_COUNT, |
---|
| 543 | 0, |
---|
| 544 | 0 |
---|
| 545 | ); |
---|
[3a4ae6c] | 546 | |
---|
| 547 | puts( "*** END OF TEST 26 ***" ); |
---|
[ac7d5ef0] | 548 | exit( 0 ); |
---|
| 549 | } |
---|
| 550 | |
---|