aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-04 23:40:37 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-04 23:40:37 +0300
commita6557ed0233e2193cef0ab5b4cea7f1d7f19ad5d (patch)
tree1562d5100331d45395b009be44a612a7c792108e /include
parentfdbc5adf83741d7e3af0c3f0ffdb59bdf42493b6 (diff)
downloadkmi-a6557ed0233e2193cef0ab5b4cea7f1d7f19ad5d.tar.gz
kmi-a6557ed0233e2193cef0ab5b4cea7f1d7f19ad5d.zip
use notification framework for orphanizing threads
Diffstat (limited to 'include')
-rw-r--r--include/kmi/syscalls.h3
-rw-r--r--include/kmi/uapi.h8
2 files changed, 6 insertions, 5 deletions
diff --git a/include/kmi/syscalls.h b/include/kmi/syscalls.h
index 93d0ac9..4ae0f0b 100644
--- a/include/kmi/syscalls.h
+++ b/include/kmi/syscalls.h
@@ -186,6 +186,9 @@ enum notify_flag {
/** An interrupt request. */
NOTIFY_IRQ = (1 << 2),
+
+ /** Thread has become orphaned. */
+ NOTIFY_ORPHANED = (1 << 3),
};
/* function declarations should be somewhere else, this file could be used in
diff --git a/include/kmi/uapi.h b/include/kmi/uapi.h
index 76a759f..42d6e5b 100644
--- a/include/kmi/uapi.h
+++ b/include/kmi/uapi.h
@@ -843,18 +843,16 @@ SYSCALL_DECLARE1(exit, tid);
/**
* Request that a thread becomes orphant, i.e. eventually attached to the init
- * process. Can be used to stop threads within a process by sending an
- * appropriate signal to the troublesome thread which then detaches itself from
- * its root process.
+ * process. Can be used to stop threads within a process.
*
* @param t Current tcb.
- * @param a Unused.
+ * @param tid Which thread to orphanize.
* @param b Unused.
* @param c Unused.
* @param d Unused.
* @param e Unused.
*/
-SYSCALL_DECLARE0(detach);
+SYSCALL_DECLARE1(detach, tid);
/** @} */