From 862a0eeb1197539c0e69381cb5aaccb9e1c64c0f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 13 May 2016 11:22:39 +0200 Subject: score: Rework _Thread_Restart_other() Rework _Thread_Restart_other() to use _Thread_Change_life_locked(). Cope with concurrent change requests by means of a pending request counter. Update #2555. Update #2626. --- cpukit/score/include/rtems/score/statesimpl.h | 4 ++-- cpukit/score/include/rtems/score/thread.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'cpukit/score/include/rtems') diff --git a/cpukit/score/include/rtems/score/statesimpl.h b/cpukit/score/include/rtems/score/statesimpl.h index 8aebba068e..a560329a17 100644 --- a/cpukit/score/include/rtems/score/statesimpl.h +++ b/cpukit/score/include/rtems/score/statesimpl.h @@ -78,8 +78,8 @@ extern "C" { #define STATES_WAITING_FOR_BSD_WAKEUP 0x80000 /** This macro corresponds to a task being a zombie. */ #define STATES_ZOMBIE 0x200000 -/** This macro corresponds to a task restarting. */ -#define STATES_RESTARTING 0x800000 +/** This macro corresponds to a task those life is changing. */ +#define STATES_LIFE_IS_CHANGING 0x800000 /** This macro corresponds to a task waiting for a join. */ #define STATES_WAITING_FOR_JOIN 0x1000000 /** This macro corresponds to a task waiting for a mutex. */ diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 9b35b85f91..6d41d4d4c7 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -543,6 +543,11 @@ typedef struct { * @brief The current thread life state. */ Thread_Life_state state; + + /** + * @brief The count of pending life change requests. + */ + uint32_t pending_life_change_requests; } Thread_Life_control; #if defined(RTEMS_SMP) -- cgit v1.2.3