Kernel: better handle kernel errors

This commit is contained in:
Bananymous
2023-08-29 00:13:21 +03:00
parent 8032824054
commit 250789aa20
2 changed files with 8 additions and 0 deletions

View File

@@ -186,6 +186,9 @@ namespace Kernel
asm volatile("cli");
if (ret.is_error() && ret.error().is_kernel_error())
Kernel::panic("Kernel error while returning to userspace {}", ret.error());
ASSERT(Kernel::Thread::current().state() == Kernel::Thread::State::Executing);
Thread::current().load_sse();