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

Kernel: Implement more x86_64 context switching functionality

This commit is contained in:
Gunnar Beutner 2021-06-27 19:49:19 +02:00 committed by Andreas Kling
parent 076692b1ef
commit 32840dfa17
8 changed files with 151 additions and 132 deletions

View file

@ -193,8 +193,7 @@ void Processor::switch_context(Thread*& from_thread, Thread*& to_thread)
// Switch to new thread context, passing from_thread and to_thread
// through to the new context using registers edx and eax
asm volatile(
// NOTE: changing how much we push to the stack affects
// SWITCH_CONTEXT_TO_STACK_SIZE and thread_context_first_enter()!
// NOTE: changing how much we push to the stack affects thread_context_first_enter()!
"pushfl \n"
"pushl %%ebx \n"
"pushl %%esi \n"