mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-25 11:51:38 +08:00
score: Add STATES_RESTARTING
Use separate state for thread restart.
This commit is contained in:
@@ -138,6 +138,7 @@ static const rtems_assoc_t rtems_monitor_state_assoc[] = {
|
||||
{ "Wterm", STATES_WAITING_FOR_TERMINATION, 0 },
|
||||
{ "ZOMBI", STATES_ZOMBIE, 0 },
|
||||
{ "MIGRA", STATES_MIGRATING, 0 },
|
||||
{ "RESTA", STATES_RESTARTING, 0 },
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
|
||||
|
||||
@@ -84,6 +84,8 @@ extern "C" {
|
||||
#define STATES_ZOMBIE 0x200000
|
||||
/** This macro corresponds to a task migrating to another scheduler. */
|
||||
#define STATES_MIGRATING 0x400000
|
||||
/** This macro corresponds to a task restarting. */
|
||||
#define STATES_RESTARTING 0x800000
|
||||
|
||||
/** This macro corresponds to a task which is in an interruptible
|
||||
* blocking state.
|
||||
|
||||
@@ -224,7 +224,7 @@ static void _Thread_Start_life_change(
|
||||
the_thread->budget_callout = the_thread->Start.budget_callout;
|
||||
the_thread->real_priority = priority;
|
||||
|
||||
_Thread_Set_transient( the_thread );
|
||||
_Thread_Set_state( the_thread, STATES_RESTARTING );
|
||||
_Thread_queue_Extract_with_proxy( the_thread );
|
||||
_Watchdog_Remove( &the_thread->Timer );
|
||||
_Scheduler_Set_priority_if_higher( scheduler, the_thread, priority );
|
||||
|
||||
Reference in New Issue
Block a user