Changeset 5a21b1d1 in rtems


Ignore:
Timestamp:
09/26/23 06:34:17 (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
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)
Message:

validation: Compatibility for other RTEMS versions

Make some performance tests compatible to other RTEMS versions which do
not allow changing the priority of a task which owns a priority
inheritance mutex.

Update #3716.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/validation/tc-sem-performance.c

    r3fa6e41 r5a21b1d1  
    383383)
    384384{
     385  SetSelfPriority( PRIO_HIGH );
    385386  ObtainMutex( ctx->mutex_id );
    386387  Send( ctx, EVENT_OBTAIN );
    387   SetPriority( ctx->worker_id, PRIO_LOW );
     388  Yield();
    388389  Send( ctx, EVENT_RELEASE );
    389390}
     
    402403static void RtemsSemReqPerfMtxPiReleaseOne_Body( RtemsSemValPerf_Context *ctx )
    403404{
     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   */
    404410  ctx->status = rtems_semaphore_release( ctx->mutex_id );
    405411}
     
    427433  T_quiet_rsc( ctx->status, RTEMS_SUCCESSFUL );
    428434
    429   SetPriority( ctx->worker_id, PRIO_HIGH );
     435  SetSelfPriority( PRIO_NORMAL );
    430436
    431437  return tic == toc;
     
    735741{
    736742  Send( ctx, EVENT_OBTAIN );
    737   SetPriority( ctx->worker_id, PRIO_LOW );
     743  SetSelfPriority( PRIO_VERY_HIGH );
    738744  Send( ctx, EVENT_END | EVENT_RELEASE );
    739745}
     
    785791
    786792  *delta = ctx->end - ctx->begin;
    787   SetPriority( ctx->worker_id, PRIO_HIGH );
    788793  ReleaseMutex( ctx->mutex_id );
     794  SetSelfPriority( PRIO_NORMAL );
    789795
    790796  return tic == toc;
     
    826832{
    827833  Send( ctx, EVENT_OBTAIN );
    828   SetPriority( ctx->worker_id, PRIO_LOW );
     834  SetSelfPriority( PRIO_VERY_HIGH );
    829835  Send( ctx, EVENT_END | EVENT_RELEASE );
    830836}
     
    874880
    875881  *delta = ctx->end - ctx->begin;
    876   SetPriority( ctx->worker_id, PRIO_HIGH );
    877882  ReleaseMutex( ctx->mutex_id );
     883  SetSelfPriority( PRIO_NORMAL );
    878884
    879885  return tic == toc;
Note: See TracChangeset for help on using the changeset viewer.