diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-13 06:48:58 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-18 08:20:16 +0200 |
commit | 709f38a97287ff1aa8e8c0668c2d066e711db87c (patch) | |
tree | e711e14275c58c0ee8483468fca804476db0fdbd /cpukit/score/src/threadrestart.c | |
parent | score: _User_extensions_Handler_initialization() (diff) | |
download | rtems-709f38a97287ff1aa8e8c0668c2d066e711db87c.tar.bz2 |
score: Use chain iterator for user extensions
Add a lock and use a chain iterator for safe iteration during concurrent
user extension addition and removal.
Ensure that dynamically added thread delete and fatal extensions are
called in reverse order.
Update #2555.
Update #2692.
Diffstat (limited to 'cpukit/score/src/threadrestart.c')
-rw-r--r-- | cpukit/score/src/threadrestart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c index 59754a86fb..13b4365b35 100644 --- a/cpukit/score/src/threadrestart.c +++ b/cpukit/score/src/threadrestart.c @@ -97,6 +97,7 @@ static void _Thread_Free( Thread_Control *the_thread ) _Objects_Get_information_id( the_thread->Object.id ); _User_extensions_Thread_delete( the_thread ); + _User_extensions_Destroy_iterators( the_thread ); _ISR_lock_Destroy( &the_thread->Keys.Lock ); _Scheduler_Node_destroy( _Scheduler_Get( the_thread ), the_thread ); _ISR_lock_Destroy( &the_thread->Timer.Lock ); @@ -255,6 +256,7 @@ void _Thread_Life_action_handler( executing->Life.state = THREAD_LIFE_NORMAL; + _User_extensions_Destroy_iterators( executing ); _Thread_Load_environment( executing ); _Thread_Restart_self( executing ); RTEMS_UNREACHABLE(); |