diff options
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libcsupport.h | 7 | ||||
-rw-r--r-- | cpukit/libcsupport/src/newlibc_reent.c | 26 |
2 files changed, 3 insertions, 30 deletions
diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h index 7d40084ece..c1bb9a191c 100644 --- a/cpukit/libcsupport/include/rtems/libcsupport.h +++ b/cpukit/libcsupport/include/rtems/libcsupport.h @@ -85,11 +85,6 @@ bool newlib_create_hook( #define __RTEMS_NEWLIB_BEGIN 0 -void newlib_delete_hook( - rtems_tcb *current_task, - rtems_tcb *deleted_task -); - void newlib_terminate_hook( rtems_tcb *current_task ); @@ -99,7 +94,7 @@ void newlib_terminate_hook( newlib_create_hook, /* rtems_task_create */ \ 0, /* rtems_task_start */ \ 0, /* rtems_task_restart */ \ - newlib_delete_hook, /* rtems_task_delete */ \ + 0, /* rtems_task_delete */ \ 0, /* task_switch */ \ __RTEMS_NEWLIB_BEGIN, /* task_begin */ \ 0, /* task_exitted */ \ 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( |