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