From e3be6915989d79a8797b775974f501a359226319 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 27 May 2013 17:31:46 +0200 Subject: score: Remove idle field of Per_CPU_Control This field is unused except for special case simulator clock drivers. In these places use an alternative. Add and use _Thread_Set_global_exit_status() and _Thread_Get_global_exit_status(). --- cpukit/score/inline/rtems/score/thread.inl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'cpukit/score/inline/rtems/score') diff --git a/cpukit/score/inline/rtems/score/thread.inl b/cpukit/score/inline/rtems/score/thread.inl index 681cfcc3df..a42da1d5b8 100644 --- a/cpukit/score/inline/rtems/score/thread.inl +++ b/cpukit/score/inline/rtems/score/thread.inl @@ -344,6 +344,24 @@ RTEMS_INLINE_ROUTINE void _Thread_Internal_free ( _Objects_Free( &_Thread_Internal_information, &the_task->Object ); } +RTEMS_INLINE_ROUTINE void _Thread_Set_global_exit_status( + uint32_t exit_status +) +{ + Thread_Control *idle = (Thread_Control *) + _Thread_Internal_information.local_table[ 1 ]; + + idle->Wait.return_code = exit_status; +} + +RTEMS_INLINE_ROUTINE uint32_t _Thread_Get_global_exit_status( void ) +{ + const Thread_Control *idle = (const Thread_Control *) + _Thread_Internal_information.local_table[ 1 ]; + + return idle->Wait.return_code; +} + /** * This routine returns the C library re-enterant pointer. */ -- cgit v1.2.3