diff options
author | Tom <tomut@yahoo.com> | 2020-11-16 20:51:34 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-30 13:17:02 +0100 |
commit | 6a620562cc7298c2f591a06817ff560c9ef1deac (patch) | |
tree | f163becbd40b4b4cf7058ca2ea191dec7335f1ed /Kernel/Thread.h | |
parent | 6cb640eebaf40acbd505bcfdb0dee8e99fb77223 (diff) | |
download | serenity-6a620562cc7298c2f591a06817ff560c9ef1deac.zip |
Kernel: Allow passing a thread argument for new kernel threads
This adds the ability to pass a pointer to kernel thread/process.
Also add the ability to use a closure as thread function, which
allows passing information to a kernel thread more easily.
Diffstat (limited to 'Kernel/Thread.h')
-rw-r--r-- | Kernel/Thread.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/Thread.h b/Kernel/Thread.h index 1235de6e42..07e98cd046 100644 --- a/Kernel/Thread.h +++ b/Kernel/Thread.h @@ -572,6 +572,8 @@ public: bool should_die() const { return m_should_die; } void die_if_needed(); + void exit(void* = nullptr); + bool tick(); void set_ticks_left(u32 t) { m_ticks_left = t; } u32 ticks_left() const { return m_ticks_left; } |