diff options
Diffstat (limited to 'c/src/exec/rtems/src/tasks.c')
-rw-r--r-- | c/src/exec/rtems/src/tasks.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/c/src/exec/rtems/src/tasks.c b/c/src/exec/rtems/src/tasks.c index 5fdff2db18..40426642c9 100644 --- a/c/src/exec/rtems/src/tasks.c +++ b/c/src/exec/rtems/src/tasks.c @@ -105,6 +105,8 @@ User_extensions_routine _RTEMS_tasks_Delete_extension( next = tvp->next; if (tvp->dtor) (*tvp->dtor)( tvp->ptr ); + if (executing == deleted) + *tvp->ptr = tvp->gval; _Workspace_Free( tvp ); tvp = next; } @@ -137,13 +139,15 @@ void _RTEMS_tasks_Switch_extension( tvp = executing->task_variables; while (tvp) { - tvp->var = *tvp->ptr; + tvp->tval = *tvp->ptr; + *tvp->ptr = tvp->gval; tvp = tvp->next; } tvp = heir->task_variables; while (tvp) { - *tvp->ptr = tvp->var; + tvp->gval = *tvp->ptr; + *tvp->ptr = tvp->tval; tvp = tvp->next; } } |