Changeset 45393975 in rtems


Ignore:
Timestamp:
01/28/23 09:56:38 (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
29a3ad1b
Parents:
6fa3a3b
git-author:
Sebastian Huber <sebastian.huber@…> (01/28/23 09:56:38)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/28/23 16:58:20)
Message:

score: Help static analysis in thread init

Add an assert to _Thread_Initialize_scheduler_and_wait_nodes() which may
help a static analyzer. Use a do/while loop since we have at least one
scheduler.

Update #4832.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadinitialize.c

    r6fa3a3b r45393975  
    140140   * configured.
    141141   */
    142   while ( scheduler_index < _Scheduler_Count ) {
     142
     143  _Assert ( _Scheduler_Count >= 1 );
     144
     145  do {
    143146    Priority_Control priority;
    144147
     
    173176    ++scheduler;
    174177    ++scheduler_index;
    175   }
     178  } while ( scheduler_index < _Scheduler_Count );
    176179
    177180  /*
Note: See TracChangeset for help on using the changeset viewer.