summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/tasks.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/rtems/src/tasks.c')
-rw-r--r--cpukit/rtems/src/tasks.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index 5fdff2db18..40426642c9 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/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;
}
}