summaryrefslogtreecommitdiff
path: root/Source/Kernel/SyscallManager
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/SyscallManager')
-rw-r--r--Source/Kernel/SyscallManager/IDT.ns.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Kernel/SyscallManager/IDT.ns.cpp b/Source/Kernel/SyscallManager/IDT.ns.cpp
index 0744e56..46e6ee2 100644
--- a/Source/Kernel/SyscallManager/IDT.ns.cpp
+++ b/Source/Kernel/SyscallManager/IDT.ns.cpp
@@ -79,7 +79,11 @@ extern "C" void interrupt_handler(registers_t regs) {
Task::currProcess()->getVirtualTerminal()->put(WChar(regs.ebx));
} else if (regs.eax == 0xFFFFFF02) {
Task::currThread()->sleep(regs.ebx);
+ } else if (regs.eax == 0xFFFFFF03) {
+ Task::currProcess()->getVirtualTerminal()->writeHex(regs.ebx);
}
+ //Some syscalls have maybee modified current page directory, set it back to one for current process
+ Task::currProcess()->getPagedir()->switchTo();
}
if (regs.int_no == 66) { //This syscall signals to kernel that thread ended.
Task::currentThreadExits(regs.eax); //DO NOT COUNT ON COMMING BACK FROM HERE