Changeset e660f86 in rtems


Ignore:
Timestamp:
Jul 4, 2009, 7:45:18 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
c6dc6db
Parents:
cf46f9de
Message:

2009-07-04 Joel Sherrill <joel.sherrill@…>

  • rtems/src/taskinitusers.c: Restructure to eliminate dead check -- loop will not be executed when 0 tasks. Also improved comments and eliminated a local variable.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rcf46f9de re660f86  
     12009-07-04      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * rtems/src/taskinitusers.c: Restructure to eliminate dead check --
     4        loop will not be executed when 0 tasks. Also improved comments and
     5        eliminated a local variable.
     6
    172009-07-03      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • cpukit/rtems/src/taskinitusers.c

    rcf46f9de re660f86  
    5454  rtems_status_code                 return_value;
    5555  rtems_initialization_tasks_table *user_tasks;
    56   rtems_api_configuration_table    *api_configuration;
    57 
    58 
    59   api_configuration = &Configuration_RTEMS_API;
    6056
    6157  /*
    62    *  NOTE:  This is slightly different from the Ada implementation.
     58   *  Move information into local variables
    6359   */
     60  user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
     61  maximum    = Configuration_RTEMS_API.number_of_initialization_tasks;
    6462
    65   user_tasks = api_configuration->User_initialization_tasks_table;
    66   maximum    = api_configuration->number_of_initialization_tasks;
    67 
    68   if ( !user_tasks || maximum == 0 )
     63  /*
     64   *  Verify that we have a set of user tasks to iterate
     65   */
     66  if ( !user_tasks )
    6967    return;
    7068
     69  /*
     70   *  Now iterate over the initialization tasks and create/start them.
     71   */
    7172  for ( index=0 ; index < maximum ; index++ ) {
    7273    return_value = rtems_task_create(
     
    7879      &id
    7980    );
    80 
    8181    if ( !rtems_is_status_successful( return_value ) )
    8282      _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
     
    8787      user_tasks[ index ].argument
    8888    );
    89 
    9089    if ( !rtems_is_status_successful( return_value ) )
    9190      _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
Note: See TracChangeset for help on using the changeset viewer.