summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-19 17:16:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:46:00 +0200
commitd566f33e67969fd9a5c1dfdfc868d7b3f5d6655e (patch)
treeb6f4d68df9658524282cc999a2558561c322cd70
parenttestsuites: Use _Thread_Get_executing() (diff)
downloadrtems-d566f33e67969fd9a5c1dfdfc868d7b3f5d6655e.tar.bz2
libcsupport: Use _Thread_Get_executing()
-rw-r--r--cpukit/libcsupport/src/__times.c4
-rw-r--r--cpukit/libcsupport/src/sync.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
index d941f933db..71eb4e20e9 100644
--- a/cpukit/libcsupport/src/__times.c
+++ b/cpukit/libcsupport/src/__times.c
@@ -70,7 +70,7 @@ clock_t _times(
);
_Timestamp_Divide(
- &_Thread_Executing->cpu_time_used,
+ &_Thread_Get_executing()->cpu_time_used,
&per_tick,
&ticks,
&fractional_ticks
@@ -78,7 +78,7 @@ clock_t _times(
ptms->tms_utime = ticks;
}
#else
- ptms->tms_utime = _Thread_Executing->cpu_time_used;
+ ptms->tms_utime = _Thread_Get_executing()->cpu_time_used;
#endif
ptms->tms_stime = ticks;
ptms->tms_cutime = 0;
diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c
index 2e8386754c..6cb6a2807d 100644
--- a/cpukit/libcsupport/src/sync.c
+++ b/cpukit/libcsupport/src/sync.c
@@ -65,10 +65,11 @@ static void sync_per_thread(Thread_Control *t)
*/
this_reent = t->libc_reent;
if ( this_reent ) {
- current_reent = _Thread_Executing->libc_reent;
- _Thread_Executing->libc_reent = this_reent;
+ Thread_Control *executing = _Thread_Get_executing();
+ current_reent = executing->libc_reent;
+ executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
- _Thread_Executing->libc_reent = current_reent;
+ executing->libc_reent = current_reent;
}
}