summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/newlibc_reent.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/newlibc_reent.c')
-rw-r--r--cpukit/libcsupport/src/newlibc_reent.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c
index 88e5e183f8..cd3ac2a0ec 100644
--- a/cpukit/libcsupport/src/newlibc_reent.c
+++ b/cpukit/libcsupport/src/newlibc_reent.c
@@ -66,13 +66,16 @@ void newlib_delete_hook(
rtems_tcb *deleted_task
)
{
- struct _reent *ptr;
+ (void) current_task;
- ptr = deleted_task->libc_reent;
- deleted_task->libc_reent = NULL;
+ _Workspace_Free(deleted_task->libc_reent);
+}
- _reclaim_reent(ptr);
- _Workspace_Free(ptr);
+void newlib_terminate_hook(
+ rtems_tcb *current_task
+)
+{
+ _reclaim_reent(current_task->libc_reent);
}
#endif