From 0df8293e2b26cfd56824c90803d427dcbb49f738 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 15 May 2002 15:14:58 +0000 Subject: 2002-05-15 Chris Johns * include/rtems/score/thread.h, inline/rtems/score/thread.inl, src/threaddispatch.c, src/threadinitialize.c: Move the C library re-enterrant support directly into the thread dispatch code. RTEMS needs libc and so requiring libc to use a user extension with its overhead is not the best solution. This patch lowers the overhead to 2 pointer moves. --- c/src/exec/score/inline/rtems/score/thread.inl | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'c/src/exec/score/inline') diff --git a/c/src/exec/score/inline/rtems/score/thread.inl b/c/src/exec/score/inline/rtems/score/thread.inl index 0c98830f76..560006c9e9 100644 --- a/c/src/exec/score/inline/rtems/score/thread.inl +++ b/c/src/exec/score/inline/rtems/score/thread.inl @@ -387,5 +387,35 @@ RTEMS_INLINE_ROUTINE void _Thread_Internal_free ( _Objects_Free( &_Thread_Internal_information, &the_task->Object ); } +/*PAGE + * + * _Thread_Get_libc_reent + * + * DESCRIPTION: + * + * This routine returns the C library re-enterant pointer. + */ + +RTEMS_INLINE_ROUTINE void **_Thread_Get_libc_reent( void ) +{ + return _Thread_libc_reent; +} + +/*PAGE + * + * _Thread_Set_libc_reent + * + * DESCRIPTION: + * + * This routine set the C library re-enterant pointer. + */ + +RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( + void **libc_reent +) +{ + _Thread_libc_reent = libc_reent; +} + #endif /* end of include file */ -- cgit v1.2.3