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.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c
index cd3ac2a0ec..430157cf0f 100644
--- a/cpukit/libcsupport/src/newlibc_reent.c
+++ b/cpukit/libcsupport/src/newlibc_reent.c
@@ -35,9 +35,6 @@ bool newlib_create_hook(
rtems_tcb *creating_task
)
{
- struct _reent *ptr;
- bool ok;
-
#if !defined(__DYNAMIC_REENT__)
if (_Thread_libc_reent == 0)
{
@@ -47,28 +44,9 @@ bool newlib_create_hook(
}
#endif
- /* It is OK to allocate from the workspace because these
- * hooks run with thread dispatching disabled.
- */
- ptr = (struct _reent *) _Workspace_Allocate(sizeof(*ptr));
- creating_task->libc_reent = ptr;
- ok = ptr != NULL;
-
- if (ok) {
- _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
- }
-
- return ok;
-}
-
-void newlib_delete_hook(
- rtems_tcb *current_task,
- rtems_tcb *deleted_task
-)
-{
- (void) current_task;
+ _REENT_INIT_PTR((creating_task->libc_reent)); /* GCC extension: structure constants */
- _Workspace_Free(deleted_task->libc_reent);
+ return true;
}
void newlib_terminate_hook(