sched/scheduler.c
/**************************************************************************
 * Name:
 *  sched_default_task_exit_point
 *
 * Description:
 *  Called when a task has finished executing the task entry point and returns
 *
 * Assumptions:
 *  This function does not exit.
 *
 *************************************************************************/


Called when a task has finished executing the task entry point and returns

This function does not exit.
Called when a task has finished executing the task entry point and returns This function does not exit .
void sched_default_task_exit_point(void)
{
  irq_state_t irq_state = cpu_disableint();
  tcb_t *this_tcb             = sched_get_current_task();
  this_tcb->t_state           = HALTED;
  this_tcb->waiting_tcb_sema  = NULL;
  cpu_enableint(irq_state);
  sched_preempt_task(this_tcb);
}
void sched_default_task_exit_point ( void ) { irq_state_t irq_state = cpu_disableint ( ) ; tcb_t * this_tcb = sched_get_current_task ( ) ; this_tcb -> t_state = HALTED ; this_tcb -> waiting_tcb_sema = NULL ; cpu_enableint ( irq_state ) ; sched_preempt_task ( this_tcb ) ; }
Name:
  sched_default_task_exit_point
Name : sched_default_task_exit_point
/* Move this task in the HALT state and wait for the idle task to clean up
   * it's memory.
   */ /* Switch context to the next running task */