Changeset 2979c28 in rtems


Ignore:
Timestamp:
Nov 12, 1999, 9:21:09 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
d8f3f65b
Parents:
3971537
Message:

+ Changed validation of the_thread to validation of location.
+ Removed error path that should never happen.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/itron/src/sta_tsk.c

    r3971537 r2979c28  
    3232
    3333  the_thread = _ITRON_Task_Get( tskid, &location );
    34   if (!the_thread)
    35     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
    36 
    37   if ( !_States_Is_dormant( the_thread->current_state ) )
    38     _ITRON_return_errorno( E_OBJ );
    39 
    4034  switch ( location ) {
    4135    case OBJECTS_REMOTE:
     
    4438
    4539    case OBJECTS_LOCAL:
     40
     41      if ( !_States_Is_dormant( the_thread->current_state ) )
     42        _ITRON_return_errorno( E_OBJ );
     43
    4644      status = _Thread_Start(
    4745        the_thread,
     
    5250      );
    5351
    54       if ( !status )
    55         _ITRON_return_errorno(  E_OBJ );
     52      /*
     53       * This error can not happen entry_point is checked in create.
     54         if ( !status )           
     55           _ITRON_return_errorno(  E_OBJ );
     56       */
    5657
    57       _Thread_Enable_dispatch();
    58       return E_OK;
     58      _ITRON_return_errorno( E_OK );
    5959  }
    6060
    61   return E_OBJ;   /* unreached - only to remove warnings */
     61  _ITRON_return_errorno( E_OBJ );   /* unreached - only to remove warnings */
    6262}
    6363
  • cpukit/itron/src/sta_tsk.c

    r3971537 r2979c28  
    3232
    3333  the_thread = _ITRON_Task_Get( tskid, &location );
    34   if (!the_thread)
    35     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
    36 
    37   if ( !_States_Is_dormant( the_thread->current_state ) )
    38     _ITRON_return_errorno( E_OBJ );
    39 
    4034  switch ( location ) {
    4135    case OBJECTS_REMOTE:
     
    4438
    4539    case OBJECTS_LOCAL:
     40
     41      if ( !_States_Is_dormant( the_thread->current_state ) )
     42        _ITRON_return_errorno( E_OBJ );
     43
    4644      status = _Thread_Start(
    4745        the_thread,
     
    5250      );
    5351
    54       if ( !status )
    55         _ITRON_return_errorno(  E_OBJ );
     52      /*
     53       * This error can not happen entry_point is checked in create.
     54         if ( !status )           
     55           _ITRON_return_errorno(  E_OBJ );
     56       */
    5657
    57       _Thread_Enable_dispatch();
    58       return E_OK;
     58      _ITRON_return_errorno( E_OK );
    5959  }
    6060
    61   return E_OBJ;   /* unreached - only to remove warnings */
     61  _ITRON_return_errorno( E_OBJ );   /* unreached - only to remove warnings */
    6262}
    6363
Note: See TracChangeset for help on using the changeset viewer.