1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

Kernel: Consolidate I386/X86_64 implementations of do_init_context()

We can use ThreadRegisters::set_flags() to avoid the #ifdef's here.
This commit is contained in:
Andreas Kling 2021-08-22 12:42:10 +02:00
parent 7a4f6da61b
commit 492b7152d9

View file

@ -1296,11 +1296,7 @@ extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread)
extern "C" FlatPtr do_init_context(Thread* thread, u32 flags)
{
VERIFY_INTERRUPTS_DISABLED();
#if ARCH(I386)
thread->regs().eflags = flags;
#else
thread->regs().rflags = flags;
#endif
thread->regs().set_flags(flags);
return Processor::current().init_context(*thread, true);
}