Changeset 4b3251a in rtems
- Timestamp:
- 06/16/16 10:05:42 (7 years ago)
- Branches:
- 5, master
- Children:
- d5ff1398
- Parents:
- 57c676c6
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/16/16 10:05:42)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/16/16 10:46:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/src/threadrestart.c
r57c676c6 r4b3251a 136 136 } 137 137 138 static void _Thread_ Make_zombie( Thread_Control *the_thread )138 static void _Thread_Add_to_zombie_chain( Thread_Control *the_thread ) 139 139 { 140 140 ISR_lock_Context lock_context; 141 141 Thread_Zombie_control *zombies; 142 142 143 zombies = &_Thread_Zombies; 144 _ISR_lock_ISR_disable_and_acquire( &zombies->Lock, &lock_context ); 145 _Chain_Append_unprotected( &zombies->Chain, &the_thread->Object.Node ); 146 _ISR_lock_Release_and_ISR_enable( &zombies->Lock, &lock_context ); 147 } 148 149 static void _Thread_Make_zombie( Thread_Control *the_thread ) 150 { 143 151 if ( _Thread_Owns_resources( the_thread ) ) { 144 152 _Terminate( … … 154 162 ); 155 163 156 _Thread_Wake_up_joining_threads( the_thread );157 164 _Thread_Set_state( the_thread, STATES_ZOMBIE ); 158 165 _Thread_queue_Extract_with_proxy( the_thread ); 159 166 _Thread_Timer_remove( the_thread ); 160 167 161 zombies = &_Thread_Zombies; 162 _ISR_lock_ISR_disable_and_acquire( &zombies->Lock, &lock_context ); 163 _Chain_Append_unprotected( &zombies->Chain, &the_thread->Object.Node ); 164 _ISR_lock_Release_and_ISR_enable( &zombies->Lock, &lock_context ); 168 /* 169 * Add the thread to the thread zombie chain before we wake up joining 170 * threads, so that they are able to clean up the thread immediately. This 171 * matters for SMP configurations. 172 */ 173 _Thread_Add_to_zombie_chain( the_thread ); 174 175 _Thread_Wake_up_joining_threads( the_thread ); 165 176 } 166 177
Note: See TracChangeset
for help on using the changeset viewer.