Changeset a770651 in rtems


Ignore:
Timestamp:
10/14/22 06:49:42 (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
e9a69c5
Parents:
a1f23c2
git-author:
Sebastian Huber <sebastian.huber@…> (10/14/22 06:49:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/14/22 08:48:23)
Message:

validation: Use correct number of idle tasks

Update #3716.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/validation/tc-cpuuse.c

    ra1f23c2 ra770651  
    9898  Timestamp_Control cpu_usage_self;
    9999  Timestamp_Control cpu_usage_other;
     100  uint32_t          idle_tasks;
     101  uint32_t          cpu_index;
     102
     103  idle_tasks = 0;
     104
     105  for ( cpu_index = 0; cpu_index < rtems_scheduler_get_processor_maximum(); ++cpu_index ) {
     106    rtems_status_code sc;
     107    rtems_id          unused;
     108
     109    sc = rtems_scheduler_ident_by_processor( cpu_index, &unused );
     110
     111    if ( sc == RTEMS_SUCCESSFUL ) {
     112      ++idle_tasks;
     113    }
     114  }
    100115
    101116  id = CreateTask( "WORK", GetSelfPriority() );
     
    129144  T_eq_i64(
    130145    _Thread_Get_CPU_time_used( self ),
    131     cpu_usage_self + 12885 + rtems_scheduler_get_processor_maximum() * 4295
     146    cpu_usage_self + 12885 + 4295 * idle_tasks
    132147  );
    133148
Note: See TracChangeset for help on using the changeset viewer.