summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-04-02 20:40:47 +0200
committerAndreas Kling <kling@serenityos.org>2023-04-04 10:33:42 +0200
commitc3915e4058341570e746979a69ce6696de232da5 (patch)
tree75605186bbe529d45adc9d32be0d811b7d555d9c /Kernel/Syscalls
parenta098266ff5086e52b1af2e11fd1835f4c22a746d (diff)
downloadserenity-c3915e4058341570e746979a69ce6696de232da5.zip
Kernel: Stop using *LockRefPtr for Thread
These were stored in a bunch of places. The main one that's a bit iffy is the Mutex::m_holder one, which I'm going to simplify in a subsequent commit. In Plan9FS and WorkQueue, we can't make the NNRPs const due to initialization order problems. That's probably doable with further cleanup, but left as an exercise for our future selves. Before starting this, I expected the thread blockers to be a problem, but as it turns out they were super straightforward (for once!) as they don't mutate the thread after initiating a block, so they can just use simple const-ified NNRPs.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/thread.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp
index c01bd0b730..8e5dfabb38 100644
--- a/Kernel/Syscalls/thread.cpp
+++ b/Kernel/Syscalls/thread.cpp
@@ -43,7 +43,7 @@ ErrorOr<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<Sys
// FIXME: Do something with guard pages?
- auto thread = TRY(Thread::try_create(*this));
+ auto thread = TRY(Thread::create(*this));
// We know this thread is not the main_thread,
// So give it a unique name until the user calls $set_thread_name on it