diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-04 19:25:12 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-04 19:25:12 +0300 |
| commit | 07c2376702fb3d508d6ffad6b0ce93b83972ad6e (patch) | |
| tree | 9ce46b000f8411fa86118645063b4df05d018dbf /include/arch/tcb.h | |
| parent | 66e7f184a925247bac51aae02d01483faa5454fc (diff) | |
| download | kmi-07c2376702fb3d508d6ffad6b0ce93b83972ad6e.tar.gz kmi-07c2376702fb3d508d6ffad6b0ce93b83972ad6e.zip | |
add zombie and orphan threads
+ Should write this down somewhere but the idea is that when a process
gets killed, it frees all the memory it can, making all threads within
that process orphans. Orphaned threads are assigned to the init
process, which will generally call exit() on each one. Zombie threads
are threads that own some bit of shared data, and whose reference
count is above zero. They may not be swapped to or called, even though
they take up space in thread map and reserve their thread ID.
Diffstat (limited to 'include/arch/tcb.h')
| -rw-r--r-- | include/arch/tcb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/arch/tcb.h b/include/arch/tcb.h index 4e82ab1..115f49d 100644 --- a/include/arch/tcb.h +++ b/include/arch/tcb.h @@ -33,6 +33,13 @@ void tcb_assign(struct tcb *t); void setup_rpc_stack(struct tcb *t); /** + * Free memory backing rpc stack. + * + * @param t Thred whose RPC stack should be destroyed. + */ +void destroy_rpc_stack(struct tcb *t); + +/** * Maximum size of one individual RPC stack instance. * * @return Max size of one individual RPC stack instance. |
