From 85561feb40838f1407078e8de5d7eb0a66a31aad Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 29 Jun 2021 17:48:10 +0200 Subject: [PATCH] Kernel: Rename some variables to arch-independent names --- Kernel/Syscalls/thread.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index b9a4a2992a..e15aa263bf 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -28,12 +28,12 @@ KResultOr Process::sys$create_thread(void* (*entry)(void*), Userspace((FlatPtr)params.m_stack_location); - user_esp += stack_size; - if (user_esp.has_overflow()) + auto user_sp = Checked((FlatPtr)params.m_stack_location); + user_sp += stack_size; + if (user_sp.has_overflow()) return EOVERFLOW; - if (!MM.validate_user_stack(*this, VirtualAddress(user_esp.value() - 4))) + if (!MM.validate_user_stack(*this, VirtualAddress(user_sp.value() - 4))) return EFAULT; // FIXME: return EAGAIN if Thread::all_threads().size() is greater than PTHREAD_THREADS_MAX @@ -65,11 +65,11 @@ KResultOr Process::sys$create_thread(void* (*entry)(void*), Userspace