summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/inline
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-05-15 15:14:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-05-15 15:14:58 +0000
commit0df8293e2b26cfd56824c90803d427dcbb49f738 (patch)
tree3ecc5d39a954200758071dd742b03484518a51a3 /c/src/exec/score/inline
parent2001-05-15 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-0df8293e2b26cfd56824c90803d427dcbb49f738.tar.bz2
2002-05-15 Chris Johns <ccj@acm.org>
* 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.
Diffstat (limited to 'c/src/exec/score/inline')
-rw-r--r--c/src/exec/score/inline/rtems/score/thread.inl30
1 files changed, 30 insertions, 0 deletions
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 */