Changeset 25789705 in rtems


Ignore:
Timestamp:
Nov 15, 1999, 9:35:14 PM (20 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
40aac29
Parents:
1ae60eb4
Message:

+ Fixed files to consistantly use a case of the location after calls

to ITRON_Task_Get.

+ Modified to consistantly call _ITRON_return_errorno with E_OK.
+ Optimized the code to not disable dispatch prior to checking input values.

Files:
22 edited

Legend:

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

    r1ae60eb4 r25789705  
    3333    case OBJECTS_REMOTE:
    3434    case OBJECTS_ERROR:
    35     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
    3636
    3737    case OBJECTS_LOCAL:
     
    3939       * XXX - FILL ME IN.
    4040       */
    41       _ITRON_return_errorno( E_OK );
     41      break;
    4242  }
    4343
    44   _ITRON_return_errorno( E_OBJ );  /* XXX - Should never get here */
     44  _ITRON_return_errorno( E_OK );
    4545}
    4646
  • c/src/exec/itron/src/chg_pri.c

    r1ae60eb4 r25789705  
    3434    case OBJECTS_REMOTE:
    3535    case OBJECTS_ERROR:
    36       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ));
     36      return _ITRON_Task_Clarify_get_id_error( tskid );
    3737
    3838    case OBJECTS_LOCAL:
     
    5555        _Thread_Change_priority( the_thread, new_priority, FALSE );
    5656
    57        _ITRON_return_errorno( E_OK );
     57      break;
    5858  }
    5959
    60   _ITRON_return_errorno( E_OBJ );  /* XXX - Should never get here */
     60  _ITRON_return_errorno( E_OK );
    6161}
    6262
  • c/src/exec/itron/src/del_tsk.c

    r1ae60eb4 r25789705  
    2828  register Thread_Control *the_thread;
    2929  Objects_Locations        location;
    30   ER                       result;
     30  ER                       result = E_OK; /* to avoid warning */
    3131
    3232  the_thread = _ITRON_Task_Get( tskid, &location );
     
    3434    case OBJECTS_REMOTE:
    3535    case OBJECTS_ERROR:
    36       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
    37       break;
     36      return _ITRON_Task_Clarify_get_id_error( tskid );
    3837
    3938    case OBJECTS_LOCAL:
     
    4948  }
    5049
    51   _ITRON_return_errorno( E_OK );
     50  _ITRON_return_errorno( result );
    5251}
    5352
  • c/src/exec/itron/src/frsm_tsk.c

    r1ae60eb4 r25789705  
    3333    case OBJECTS_REMOTE:
    3434    case OBJECTS_ERROR:
    35       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
    3636
    3737    case OBJECTS_LOCAL:
     
    4343   
    4444      _Thread_Resume( the_thread, TRUE );
    45       _ITRON_return_errorno( E_OK );
     45      break;
    4646  }
    4747
    48   _ITRON_return_errorno( E_OBJ ); /* XXX - Should never get here */
     48 _ITRON_return_errorno( E_OK );
    4949
    5050}
  • c/src/exec/itron/src/ref_tsk.c

    r1ae60eb4 r25789705  
    3535
    3636  the_thread = _ITRON_Task_Get( tskid, &location );
    37   if ( location != OBJECTS_LOCAL)
    38     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     37  switch ( location ) {
     38    case OBJECTS_REMOTE:
     39    case OBJECTS_ERROR:
     40      return _ITRON_Task_Clarify_get_id_error( tskid );
     41 
     42    case OBJECTS_LOCAL:
    3943
    40   /*
    41    * The following are extended functions [level X ].
    42    * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented.
    43    */
     44      if ( location != OBJECTS_LOCAL )
     45        return  _ITRON_Task_Clarify_get_id_error( tskid );
    4446
    45   pk_rtsk->tskwait = 0;
    46   pk_rtsk->wid     = 0;
    47   pk_rtsk->wupcnt  = 0;
    48   pk_rtsk->suscnt  = the_thread->suspend_count;
    49   pk_rtsk->tskatr  = 0;
    50   pk_rtsk->task    = the_thread->Start.entry_point;
    51   core_priority    = the_thread->Start.initial_priority;
    52   pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority );
    53   pk_rtsk->stksz   = the_thread->Start.Initial_stack.size;
     47      /*
     48       * The following are extended functions [level X ].
     49       * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented.
     50       */
    5451
    55   /*
    56    * The following are required.
    57    */
     52      pk_rtsk->tskwait = 0;
     53      pk_rtsk->wid     = 0;
     54      pk_rtsk->wupcnt  = 0;
     55      pk_rtsk->suscnt  = the_thread->suspend_count;
     56      pk_rtsk->tskatr  = 0;       /* XXX - Not correctly implemented */
     57      pk_rtsk->task    = (FP) the_thread->Start.entry_point;
     58      core_priority    = the_thread->Start.initial_priority;
     59      pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority );
     60      pk_rtsk->stksz   = the_thread->Start.Initial_stack.size;
    5861
    59   pk_rtsk->exinf   = NULL;   /* extended information */
    60   pk_rtsk->tskpri  = _ITRON_Task_Core_to_Priority(the_thread->current_priority);
    61   pk_rtsk->tskstat = 0;
     62      /*
     63       * The following are required.
     64       */
    6265
    63   /*
    64    * Mask in the tskstat information
    65    * Convert the task state XXX double check this
    66    */
     66      pk_rtsk->exinf   = NULL;   /* extended information */
     67      pk_rtsk->tskpri  =
     68                    _ITRON_Task_Core_to_Priority(the_thread->current_priority);
    6769
    68   if ( the_thread == _Thread_Executing )
    69     pk_rtsk->tskstat |= TTS_RUN;
    70   if ((the_thread->current_state & STATES_READY)   != 0)
    71     pk_rtsk->tskstat = TTS_RDY; 
    72   if (_States_Is_dormant( the_thread->current_state ))
    73     pk_rtsk->tskstat = TTS_DMT;
    74   if ((the_thread->current_state & STATES_SUSPENDED) != 0)
    75     pk_rtsk->tskstat = TTS_SUS;
    76   if ((the_thread->current_state & STATES_BLOCKED) != 0)
    77     pk_rtsk->tskstat = TTS_WAI;
     70      /*
     71       * Mask in the tskstat information
     72       * Convert the task state XXX double check this
     73       */
     74
     75      pk_rtsk->tskstat = 0;
     76      if ( the_thread == _Thread_Executing )
     77        pk_rtsk->tskstat |= TTS_RUN;
     78      if ( _States_Is_ready(the_thread->current_state) )
     79        pk_rtsk->tskstat |= TTS_RDY; 
     80      if ( _States_Is_dormant( the_thread->current_state) )
     81        pk_rtsk->tskstat |= TTS_DMT;
     82      if ( _States_Is_suspended(the_thread->current_state) )
     83        pk_rtsk->tskstat |= TTS_SUS;
     84      if ( _States_Is_blocked(the_thread->current_state) )
     85        pk_rtsk->tskstat |= TTS_WAI;
     86
     87      break;
     88  }
    7889
    7990  _ITRON_return_errorno( E_OK );
     91
    8092}
    8193
  • c/src/exec/itron/src/rel_wai.c

    r1ae60eb4 r25789705  
    3232    case OBJECTS_REMOTE:
    3333    case OBJECTS_ERROR:
    34       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     34      return _ITRON_Task_Clarify_get_id_error( tskid );
    3535
    3636    case OBJECTS_LOCAL:
     
    3838       * XXX - FILL ME IN.
    3939       */
    40       return E_OK;
     40
     41      break;
    4142  }
    4243
    43   return E_OBJ;           /* XXX - Should never get here */
     44  _ITRON_return_errorno( E_OK );
    4445}
    4546
  • c/src/exec/itron/src/rot_rdq.c

    r1ae60eb4 r25789705  
    2828 
    2929
     30  if (( tskpri <= 0 ) || ( tskpri >= 256 ))
     31    return E_PAR;
     32
    3033  _Thread_Disable_dispatch();
    3134
     
    3336   * Yield of processor will rotate the queue for this processor.
    3437   */
    35 
    36   if (( tskpri <= 0 ) || ( tskpri >= 256 ))
    37     _ITRON_return_errorno( E_PAR );
    3838
    3939  priority = _ITRON_Task_Core_to_Priority(_Thread_Executing->current_priority);
  • c/src/exec/itron/src/rsm_tsk.c

    r1ae60eb4 r25789705  
    3333    case OBJECTS_REMOTE:
    3434    case OBJECTS_ERROR:
    35      _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
    3636
    3737    case OBJECTS_LOCAL:
     
    4444   
    4545      _Thread_Resume( the_thread, FALSE );
    46       _Thread_Enable_dispatch();
    47       return E_OK;
     46      break;
    4847  }
    4948
    50   return E_OBJ;           /* XXX - Should never get here */
     49  _ITRON_return_errorno( E_OK );
    5150}
    5251
  • c/src/exec/itron/src/sta_tsk.c

    r1ae60eb4 r25789705  
    3535    case OBJECTS_REMOTE:
    3636    case OBJECTS_ERROR:
    37       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     37      return _ITRON_Task_Clarify_get_id_error( tskid );
    3838
    3939    case OBJECTS_LOCAL:
     
    5656       */
    5757
    58       _ITRON_return_errorno( E_OK );
     58      break;
    5959  }
    6060
    61   _ITRON_return_errorno( E_OBJ );   /* unreached - only to remove warnings */
     61  _ITRON_return_errorno( E_OK );
    6262}
    6363
  • c/src/exec/itron/src/sus_tsk.c

    r1ae60eb4 r25789705  
    3737    case OBJECTS_REMOTE:
    3838    case OBJECTS_ERROR:
    39       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     39      return _ITRON_Task_Clarify_get_id_error( tskid );
    4040
    4141    case OBJECTS_LOCAL:
     
    4545
    4646      _Thread_Suspend( the_thread );
    47       _ITRON_return_errorno( E_OK );
     47      break;
    4848  }
    4949
    50   _ITRON_return_errorno( E_OBJ );
     50  _ITRON_return_errorno( E_OK );
    5151}
    5252
  • c/src/exec/itron/src/ter_tsk.c

    r1ae60eb4 r25789705  
    3030
    3131  the_thread = _ITRON_Task_Get( tskid, &location );
     32  switch ( location ) {
     33    case OBJECTS_REMOTE:   
     34    case OBJECTS_ERROR:
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
     36     
     37    case OBJECTS_LOCAL:
     38   
     39      if ( _Thread_Is_executing( the_thread ) )
     40        _ITRON_return_errorno( E_OBJ );
     41 
     42      if ( _States_Is_dormant( the_thread->current_state ) )
     43        _ITRON_return_errorno( E_OBJ );
    3244
    33   if ( location != OBJECTS_LOCAL )
    34     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     45      _Thread_Restart( the_thread, NULL, 0 );
     46      _Thread_Set_state( the_thread, STATES_DORMANT );
     47      break;
     48  }
    3549
    36   if ( _Thread_Is_executing( the_thread ) )
    37     _ITRON_return_errorno( E_OBJ );
    38  
    39   if ( _States_Is_dormant( the_thread->current_state ) )
    40     _ITRON_return_errorno( E_OBJ );
    41 
    42   _Thread_Restart( the_thread, NULL, 0 );
    43   _Thread_Set_state( the_thread, STATES_DORMANT );
    44 
    45   _ITRON_return_errorno( E_OK );
     50  _ITRON_return_errorno( E_OK );
    4651}
    4752
  • cpukit/itron/src/can_wup.c

    r1ae60eb4 r25789705  
    3333    case OBJECTS_REMOTE:
    3434    case OBJECTS_ERROR:
    35     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
    3636
    3737    case OBJECTS_LOCAL:
     
    3939       * XXX - FILL ME IN.
    4040       */
    41       _ITRON_return_errorno( E_OK );
     41      break;
    4242  }
    4343
    44   _ITRON_return_errorno( E_OBJ );  /* XXX - Should never get here */
     44  _ITRON_return_errorno( E_OK );
    4545}
    4646
  • cpukit/itron/src/chg_pri.c

    r1ae60eb4 r25789705  
    3434    case OBJECTS_REMOTE:
    3535    case OBJECTS_ERROR:
    36       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ));
     36      return _ITRON_Task_Clarify_get_id_error( tskid );
    3737
    3838    case OBJECTS_LOCAL:
     
    5555        _Thread_Change_priority( the_thread, new_priority, FALSE );
    5656
    57        _ITRON_return_errorno( E_OK );
     57      break;
    5858  }
    5959
    60   _ITRON_return_errorno( E_OBJ );  /* XXX - Should never get here */
     60  _ITRON_return_errorno( E_OK );
    6161}
    6262
  • cpukit/itron/src/del_tsk.c

    r1ae60eb4 r25789705  
    2828  register Thread_Control *the_thread;
    2929  Objects_Locations        location;
    30   ER                       result;
     30  ER                       result = E_OK; /* to avoid warning */
    3131
    3232  the_thread = _ITRON_Task_Get( tskid, &location );
     
    3434    case OBJECTS_REMOTE:
    3535    case OBJECTS_ERROR:
    36       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
    37       break;
     36      return _ITRON_Task_Clarify_get_id_error( tskid );
    3837
    3938    case OBJECTS_LOCAL:
     
    4948  }
    5049
    51   _ITRON_return_errorno( E_OK );
     50  _ITRON_return_errorno( result );
    5251}
    5352
  • cpukit/itron/src/frsm_tsk.c

    r1ae60eb4 r25789705  
    3333    case OBJECTS_REMOTE:
    3434    case OBJECTS_ERROR:
    35       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
    3636
    3737    case OBJECTS_LOCAL:
     
    4343   
    4444      _Thread_Resume( the_thread, TRUE );
    45       _ITRON_return_errorno( E_OK );
     45      break;
    4646  }
    4747
    48   _ITRON_return_errorno( E_OBJ ); /* XXX - Should never get here */
     48 _ITRON_return_errorno( E_OK );
    4949
    5050}
  • cpukit/itron/src/ref_tsk.c

    r1ae60eb4 r25789705  
    3535
    3636  the_thread = _ITRON_Task_Get( tskid, &location );
    37   if ( location != OBJECTS_LOCAL)
    38     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     37  switch ( location ) {
     38    case OBJECTS_REMOTE:
     39    case OBJECTS_ERROR:
     40      return _ITRON_Task_Clarify_get_id_error( tskid );
     41 
     42    case OBJECTS_LOCAL:
    3943
    40   /*
    41    * The following are extended functions [level X ].
    42    * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented.
    43    */
     44      if ( location != OBJECTS_LOCAL )
     45        return  _ITRON_Task_Clarify_get_id_error( tskid );
    4446
    45   pk_rtsk->tskwait = 0;
    46   pk_rtsk->wid     = 0;
    47   pk_rtsk->wupcnt  = 0;
    48   pk_rtsk->suscnt  = the_thread->suspend_count;
    49   pk_rtsk->tskatr  = 0;
    50   pk_rtsk->task    = the_thread->Start.entry_point;
    51   core_priority    = the_thread->Start.initial_priority;
    52   pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority );
    53   pk_rtsk->stksz   = the_thread->Start.Initial_stack.size;
     47      /*
     48       * The following are extended functions [level X ].
     49       * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented.
     50       */
    5451
    55   /*
    56    * The following are required.
    57    */
     52      pk_rtsk->tskwait = 0;
     53      pk_rtsk->wid     = 0;
     54      pk_rtsk->wupcnt  = 0;
     55      pk_rtsk->suscnt  = the_thread->suspend_count;
     56      pk_rtsk->tskatr  = 0;       /* XXX - Not correctly implemented */
     57      pk_rtsk->task    = (FP) the_thread->Start.entry_point;
     58      core_priority    = the_thread->Start.initial_priority;
     59      pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority );
     60      pk_rtsk->stksz   = the_thread->Start.Initial_stack.size;
    5861
    59   pk_rtsk->exinf   = NULL;   /* extended information */
    60   pk_rtsk->tskpri  = _ITRON_Task_Core_to_Priority(the_thread->current_priority);
    61   pk_rtsk->tskstat = 0;
     62      /*
     63       * The following are required.
     64       */
    6265
    63   /*
    64    * Mask in the tskstat information
    65    * Convert the task state XXX double check this
    66    */
     66      pk_rtsk->exinf   = NULL;   /* extended information */
     67      pk_rtsk->tskpri  =
     68                    _ITRON_Task_Core_to_Priority(the_thread->current_priority);
    6769
    68   if ( the_thread == _Thread_Executing )
    69     pk_rtsk->tskstat |= TTS_RUN;
    70   if ((the_thread->current_state & STATES_READY)   != 0)
    71     pk_rtsk->tskstat = TTS_RDY; 
    72   if (_States_Is_dormant( the_thread->current_state ))
    73     pk_rtsk->tskstat = TTS_DMT;
    74   if ((the_thread->current_state & STATES_SUSPENDED) != 0)
    75     pk_rtsk->tskstat = TTS_SUS;
    76   if ((the_thread->current_state & STATES_BLOCKED) != 0)
    77     pk_rtsk->tskstat = TTS_WAI;
     70      /*
     71       * Mask in the tskstat information
     72       * Convert the task state XXX double check this
     73       */
     74
     75      pk_rtsk->tskstat = 0;
     76      if ( the_thread == _Thread_Executing )
     77        pk_rtsk->tskstat |= TTS_RUN;
     78      if ( _States_Is_ready(the_thread->current_state) )
     79        pk_rtsk->tskstat |= TTS_RDY; 
     80      if ( _States_Is_dormant( the_thread->current_state) )
     81        pk_rtsk->tskstat |= TTS_DMT;
     82      if ( _States_Is_suspended(the_thread->current_state) )
     83        pk_rtsk->tskstat |= TTS_SUS;
     84      if ( _States_Is_blocked(the_thread->current_state) )
     85        pk_rtsk->tskstat |= TTS_WAI;
     86
     87      break;
     88  }
    7889
    7990  _ITRON_return_errorno( E_OK );
     91
    8092}
    8193
  • cpukit/itron/src/rel_wai.c

    r1ae60eb4 r25789705  
    3232    case OBJECTS_REMOTE:
    3333    case OBJECTS_ERROR:
    34       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     34      return _ITRON_Task_Clarify_get_id_error( tskid );
    3535
    3636    case OBJECTS_LOCAL:
     
    3838       * XXX - FILL ME IN.
    3939       */
    40       return E_OK;
     40
     41      break;
    4142  }
    4243
    43   return E_OBJ;           /* XXX - Should never get here */
     44  _ITRON_return_errorno( E_OK );
    4445}
    4546
  • cpukit/itron/src/rot_rdq.c

    r1ae60eb4 r25789705  
    2828 
    2929
     30  if (( tskpri <= 0 ) || ( tskpri >= 256 ))
     31    return E_PAR;
     32
    3033  _Thread_Disable_dispatch();
    3134
     
    3336   * Yield of processor will rotate the queue for this processor.
    3437   */
    35 
    36   if (( tskpri <= 0 ) || ( tskpri >= 256 ))
    37     _ITRON_return_errorno( E_PAR );
    3838
    3939  priority = _ITRON_Task_Core_to_Priority(_Thread_Executing->current_priority);
  • cpukit/itron/src/rsm_tsk.c

    r1ae60eb4 r25789705  
    3333    case OBJECTS_REMOTE:
    3434    case OBJECTS_ERROR:
    35      _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
    3636
    3737    case OBJECTS_LOCAL:
     
    4444   
    4545      _Thread_Resume( the_thread, FALSE );
    46       _Thread_Enable_dispatch();
    47       return E_OK;
     46      break;
    4847  }
    4948
    50   return E_OBJ;           /* XXX - Should never get here */
     49  _ITRON_return_errorno( E_OK );
    5150}
    5251
  • cpukit/itron/src/sta_tsk.c

    r1ae60eb4 r25789705  
    3535    case OBJECTS_REMOTE:
    3636    case OBJECTS_ERROR:
    37       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     37      return _ITRON_Task_Clarify_get_id_error( tskid );
    3838
    3939    case OBJECTS_LOCAL:
     
    5656       */
    5757
    58       _ITRON_return_errorno( E_OK );
     58      break;
    5959  }
    6060
    61   _ITRON_return_errorno( E_OBJ );   /* unreached - only to remove warnings */
     61  _ITRON_return_errorno( E_OK );
    6262}
    6363
  • cpukit/itron/src/sus_tsk.c

    r1ae60eb4 r25789705  
    3737    case OBJECTS_REMOTE:
    3838    case OBJECTS_ERROR:
    39       _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     39      return _ITRON_Task_Clarify_get_id_error( tskid );
    4040
    4141    case OBJECTS_LOCAL:
     
    4545
    4646      _Thread_Suspend( the_thread );
    47       _ITRON_return_errorno( E_OK );
     47      break;
    4848  }
    4949
    50   _ITRON_return_errorno( E_OBJ );
     50  _ITRON_return_errorno( E_OK );
    5151}
    5252
  • cpukit/itron/src/ter_tsk.c

    r1ae60eb4 r25789705  
    3030
    3131  the_thread = _ITRON_Task_Get( tskid, &location );
     32  switch ( location ) {
     33    case OBJECTS_REMOTE:   
     34    case OBJECTS_ERROR:
     35      return _ITRON_Task_Clarify_get_id_error( tskid );
     36     
     37    case OBJECTS_LOCAL:
     38   
     39      if ( _Thread_Is_executing( the_thread ) )
     40        _ITRON_return_errorno( E_OBJ );
     41 
     42      if ( _States_Is_dormant( the_thread->current_state ) )
     43        _ITRON_return_errorno( E_OBJ );
    3244
    33   if ( location != OBJECTS_LOCAL )
    34     _ITRON_return_errorno( _ITRON_Task_Clarify_get_id_error( tskid ) );
     45      _Thread_Restart( the_thread, NULL, 0 );
     46      _Thread_Set_state( the_thread, STATES_DORMANT );
     47      break;
     48  }
    3549
    36   if ( _Thread_Is_executing( the_thread ) )
    37     _ITRON_return_errorno( E_OBJ );
    38  
    39   if ( _States_Is_dormant( the_thread->current_state ) )
    40     _ITRON_return_errorno( E_OBJ );
    41 
    42   _Thread_Restart( the_thread, NULL, 0 );
    43   _Thread_Set_state( the_thread, STATES_DORMANT );
    44 
    45   _ITRON_return_errorno( E_OK );
     50  _ITRON_return_errorno( E_OK );
    4651}
    4752
Note: See TracChangeset for help on using the changeset viewer.