diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-18 08:36:26 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-04 13:36:10 +0100 |
commit | 03b900d3ed120ea919ea3eded7edbece3488cff3 (patch) | |
tree | 182781fc14fe15fd67caeb80e46f1c58495839c2 /cpukit/score/src/threadrestart.c | |
parent | score: Distribute clock tick to all online CPUs (diff) | |
download | rtems-03b900d3ed120ea919ea3eded7edbece3488cff3.tar.bz2 |
score: Replace watchdog handler implementation
Use a red-black tree instead of delta chains.
Close #2344.
Update #2554.
Update #2555.
Close #2606.
Diffstat (limited to 'cpukit/score/src/threadrestart.c')
-rw-r--r-- | cpukit/score/src/threadrestart.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index 03b1fba8ff..d366f97a0f 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -84,7 +84,7 @@ static void _Thread_Make_zombie( Thread_Control *the_thread ) _Thread_Set_state( the_thread, STATES_ZOMBIE ); _Thread_queue_Extract_with_proxy( the_thread ); - _Watchdog_Remove_ticks( &the_thread->Timer ); + _Thread_Timer_remove( the_thread ); _ISR_lock_ISR_disable_and_acquire( &zombies->Lock, &lock_context ); _Chain_Append_unprotected( &zombies->Chain, &the_thread->Object.Node ); @@ -191,7 +191,9 @@ static void _Thread_Start_life_change_for_executing( Thread_Control *executing ) { - _Assert( executing->Timer.state == WATCHDOG_INACTIVE ); + _Assert( + _Watchdog_Get_state( &executing->Timer.Watchdog ) == WATCHDOG_INACTIVE + ); _Assert( executing->current_state == STATES_READY || executing->current_state == STATES_SUSPENDED @@ -246,7 +248,9 @@ void _Thread_Life_action_handler( /* Someone deleted us in the mean-time */ _Thread_Start_life_change_for_executing( executing ); } else { - _Assert( executing->Timer.state == WATCHDOG_INACTIVE ); + _Assert( + _Watchdog_Get_state( &executing->Timer.Watchdog ) == WATCHDOG_INACTIVE + ); _Assert( executing->current_state == STATES_READY || executing->current_state == STATES_SUSPENDED @@ -274,7 +278,7 @@ static void _Thread_Start_life_change( _Thread_Set_state( the_thread, STATES_RESTARTING ); _Thread_queue_Extract_with_proxy( the_thread ); - _Watchdog_Remove_ticks( &the_thread->Timer ); + _Thread_Timer_remove( the_thread ); _Thread_Change_priority( the_thread, priority, |