mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Kernel: Rename some variables to arch-independent names
This commit is contained in:
parent
2016354c12
commit
85561feb40
Notes:
sideshowbarker
2024-07-18 11:19:46 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/85561feb408 Pull-request: https://github.com/SerenityOS/serenity/pull/8317
1 changed files with 6 additions and 6 deletions
|
@ -28,12 +28,12 @@ KResultOr<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<c
|
|||
int schedule_priority = params.m_schedule_priority;
|
||||
unsigned stack_size = params.m_stack_size;
|
||||
|
||||
auto user_esp = Checked<FlatPtr>((FlatPtr)params.m_stack_location);
|
||||
user_esp += stack_size;
|
||||
if (user_esp.has_overflow())
|
||||
auto user_sp = Checked<FlatPtr>((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<FlatPtr> Process::sys$create_thread(void* (*entry)(void*), Userspace<c
|
|||
#if ARCH(I386)
|
||||
regs.eip = (FlatPtr)entry;
|
||||
regs.eflags = 0x0202;
|
||||
regs.esp = user_esp.value();
|
||||
regs.esp = user_sp.value();
|
||||
#else
|
||||
regs.rip = (FlatPtr)entry;
|
||||
regs.rflags = 0x0202;
|
||||
regs.rsp = user_esp.value();
|
||||
regs.rsp = user_sp.value();
|
||||
#endif
|
||||
regs.cr3 = space().page_directory().cr3();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue