aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-08 17:38:59 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-08 17:38:59 +0300
commit7e828ec1e1479ff9a8afe845539d08ca0dfada5f (patch)
treea227c58b30c99058fc10ff3caffeebca7dbd5913 /include
parent219c27d420fe0abe5515cefc2513c6fe60aafdf9 (diff)
downloadkmi-7e828ec1e1479ff9a8afe845539d08ca0dfada5f.tar.gz
kmi-7e828ec1e1479ff9a8afe845539d08ca0dfada5f.zip
add orphan checking to timer and irq handling
Diffstat (limited to 'include')
-rw-r--r--include/kmi/orphanage.h7
-rw-r--r--include/kmi/syscalls.h6
2 files changed, 10 insertions, 3 deletions
diff --git a/include/kmi/orphanage.h b/include/kmi/orphanage.h
index 98756c2..0506af3 100644
--- a/include/kmi/orphanage.h
+++ b/include/kmi/orphanage.h
@@ -26,6 +26,13 @@ bool orphan(struct tcb *t);
/**
* Mark \p t orphaned.
+ * Once a thread has been orphaned, it can't 'truly' be adopted by anyone again,
+ * and the init process will generally just make sure all the thread's resources
+ * are freed in a controlled manner.
+ *
+ * I did think about maybe allowing threads to be reused, I guess to save a bit
+ * of build/teardown time but I don't think it's worth it for the extra
+ * complexity.
*
* @param t Thread to orphanize.
*/
diff --git a/include/kmi/syscalls.h b/include/kmi/syscalls.h
index eece89e..b6cde34 100644
--- a/include/kmi/syscalls.h
+++ b/include/kmi/syscalls.h
@@ -177,9 +177,9 @@ enum sys_user {
/** Thread has been orphaned. */
SYS_USER_ORPHANED,
- /** Core has booted an init thread. Only used during booting, should be
- * handled specially. */
- SYS_USER_BOOTED,
+ /** A new process has been spawned. Special case for init where each
+ * core starts with this, usually it is reserved for exec. */
+ SYS_USER_SPAWNED,
};
/** Which notifications have arrived. */