diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-08-13 08:43:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-08-18 13:36:02 +0200 |
commit | d433690591cb7ba7eaf03df524640b9fc0834f7e (patch) | |
tree | 609c1f9ec432c416937df7baa971c22ccb341e5d /cpukit/include | |
parent | score: Simplify _Thread_Kill_zombies() (diff) | |
download | rtems-d433690591cb7ba7eaf03df524640b9fc0834f7e.tar.bz2 |
score: Make zombie registry observable
This helps to write tests for _Thread_Wait_for_execution_stop().
Rename Thread_Zombie_control in Thread_Zombie_registry.
Diffstat (limited to 'cpukit/include')
-rw-r--r-- | cpukit/include/rtems/score/threadimpl.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h index c4b6c941a4..45c0795d9c 100644 --- a/cpukit/include/rtems/score/threadimpl.h +++ b/cpukit/include/rtems/score/threadimpl.h @@ -48,6 +48,33 @@ extern "C" { */ /** + * @brief The thread zombie registry is used to register threads in the + * #STATES_ZOMBIE state. + */ +typedef struct { +#if defined(RTEMS_SMP) + /** + * @brief This lock protects the zombie chain. + */ + ISR_lock_Control Lock; +#endif + + /** + * @brief This chain contains the registered zombie threads. + */ + Chain_Control Chain; +} Thread_Zombie_registry; + +/** + * @brief This object is a registry for threads in the #STATES_ZOMBIE state. + * + * The registry contains zombie threads waiting to get killed by + * _Thread_Kill_zombies(). Use _Thread_Add_to_zombie_registry() to add zombie + * threads to the registry. + */ +extern Thread_Zombie_registry _Thread_Zombies; + +/** * Self for the GNU Ada Run-Time */ extern void *rtems_ada_self; |