mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +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:
parent
7a4f6da61b
commit
492b7152d9
1 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue