Changeset 5a21b1d1 in rtems
- Timestamp:
- 09/26/23 06:34:17 (2 months ago)
- Branches:
- master
- Children:
- 2b5526aa
- Parents:
- 3fa6e41
- git-author:
- Sebastian Huber <sebastian.huber@…> (09/26/23 06:34:17)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (09/26/23 07:40:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
testsuites/validation/tc-sem-performance.c
r3fa6e41 r5a21b1d1 383 383 ) 384 384 { 385 SetSelfPriority( PRIO_HIGH ); 385 386 ObtainMutex( ctx->mutex_id ); 386 387 Send( ctx, EVENT_OBTAIN ); 387 SetPriority( ctx->worker_id, PRIO_LOW);388 Yield(); 388 389 Send( ctx, EVENT_RELEASE ); 389 390 } … … 402 403 static void RtemsSemReqPerfMtxPiReleaseOne_Body( RtemsSemValPerf_Context *ctx ) 403 404 { 405 /* 406 * The release will unblock the worker task which has our priority. The 407 * scheduler ensures FIFO ordering for ready threads of the same priority, so 408 * the release will not preempt us. 409 */ 404 410 ctx->status = rtems_semaphore_release( ctx->mutex_id ); 405 411 } … … 427 433 T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL ); 428 434 429 Set Priority( ctx->worker_id, PRIO_HIGH);435 SetSelfPriority( PRIO_NORMAL ); 430 436 431 437 return tic == toc; … … 735 741 { 736 742 Send( ctx, EVENT_OBTAIN ); 737 Set Priority( ctx->worker_id, PRIO_LOW);743 SetSelfPriority( PRIO_VERY_HIGH ); 738 744 Send( ctx, EVENT_END | EVENT_RELEASE ); 739 745 } … … 785 791 786 792 *delta = ctx->end - ctx->begin; 787 SetPriority( ctx->worker_id, PRIO_HIGH );788 793 ReleaseMutex( ctx->mutex_id ); 794 SetSelfPriority( PRIO_NORMAL ); 789 795 790 796 return tic == toc; … … 826 832 { 827 833 Send( ctx, EVENT_OBTAIN ); 828 Set Priority( ctx->worker_id, PRIO_LOW);834 SetSelfPriority( PRIO_VERY_HIGH ); 829 835 Send( ctx, EVENT_END | EVENT_RELEASE ); 830 836 } … … 874 880 875 881 *delta = ctx->end - ctx->begin; 876 SetPriority( ctx->worker_id, PRIO_HIGH );877 882 ReleaseMutex( ctx->mutex_id ); 883 SetSelfPriority( PRIO_NORMAL ); 878 884 879 885 return tic == toc;
Note: See TracChangeset
for help on using the changeset viewer.