mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
A userspace process can now GPF and the OS goes on!
This is really rickety, but it kinda sorta works for my test GPF!
This commit is contained in:
parent
77299cf54d
commit
56c1f9db8e
8 changed files with 96 additions and 42 deletions
|
@ -185,11 +185,15 @@ void yield()
|
|||
if (!scheduleNewTask())
|
||||
return;
|
||||
|
||||
//kprintf("yield() jumping to new task: %x (%s)\n", current->farPtr().selector, current->name().characters());
|
||||
switchNow();
|
||||
}
|
||||
|
||||
void switchNow()
|
||||
{
|
||||
Descriptor& descriptor = getGDTEntry(current->selector());
|
||||
descriptor.type = 9;
|
||||
flushGDT();
|
||||
|
||||
//kprintf("yield() jumping to new task: %x (%s)\n", current->farPtr().selector, current->name().characters());
|
||||
asm(
|
||||
"ljmp *(%%eax)\n"
|
||||
::"a"(¤t->farPtr())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue