diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-05-15 15:14:58 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-05-15 15:14:58 +0000 |
commit | 0df8293e2b26cfd56824c90803d427dcbb49f738 (patch) | |
tree | 3ecc5d39a954200758071dd742b03484518a51a3 /cpukit/score/include | |
parent | 2001-05-15 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-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 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 07f5d2a504..18d4774a5d 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -220,6 +220,7 @@ struct Thread_Control_struct { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_context; #endif + void *libc_reent; void *API_Extensions[ THREAD_API_LAST + 1 ]; void **extensions; rtems_task_variable_t *task_variables; @@ -317,6 +318,15 @@ SCORE_EXTERN Thread_Control *_Thread_Allocated_fp; #endif /* + * The C library re-enter-rant global pointer. Some C library implementations + * such as newlib have a single global pointer that changed during a context + * switch. The pointer points to that global pointer. The Thread control block + * holds a pointer to the task specific data. + */ + +SCORE_EXTERN void **_Thread_libc_reent; + +/* * _Thread_Handler_initialization * * DESCRIPTION: |