This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

os_delete_task called from ISR

There are two tasks task 0 and task 1 and one timer_interrupt_ISR.

f_0 _task_ 0
{
   ..
   ..
   ..

  switch_2_lp_func();
   ..
   ..
   ..
   switch_2_lp_func();

}

switch_2_lp_func()
{
  starts the timer;
  os_create_task(1);
  os_switch_task();
  ..
  ..
}

lp_func _task_ 1
{
  while(1)
  {
   ...
  }
}

timer_interrupt ISR
{
  os_set_ready(0);
  os_delete_task(1);
  os_switch_task();
}

What happens when a task is deleted in ISR?
1) Is it possible that ISR will retrun to PC address on the stack or take into account of deleted task from the task list.
2) Does os_delete_task(1) delete the stack space of task 1 ?

0