summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/threaddispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/threaddispatch.c')
-rw-r--r--cpukit/score/src/threaddispatch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 18953ae596..eedc8cc9ee 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -74,6 +74,14 @@ void _Thread_Dispatch( void )
heir->ticks_executed++;
+ /*
+ * Switch libc's task specific data.
+ */
+ if ( _Thread_libc_reent ) {
+ executing->libc_reent = *_Thread_libc_reent;
+ *_Thread_libc_reent = heir->libc_reent;
+ }
+
_User_extensions_Thread_switch( executing, heir );
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )