From b5db67d19105b958f59a683a81a00a8cbf91a0e1 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 2 May 2024 07:48:20 +0200 Subject: Kernel: See below. - Check for partition as well when initializing disk. (New FS) - Return kErrorProcessFault when process crashes, as well as do a bug check when a driver crashes. Signed-off-by: Amlal El Mahrouss --- Private/Source/ProcessScheduler.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Private/Source/ProcessScheduler.cxx') diff --git a/Private/Source/ProcessScheduler.cxx b/Private/Source/ProcessScheduler.cxx index 5ac253cb..22222f9e 100644 --- a/Private/Source/ProcessScheduler.cxx +++ b/Private/Source/ProcessScheduler.cxx @@ -32,13 +32,19 @@ STATIC Int32 kLastExitCode = 0U; /// @note Not thread-safe. const Int32 &rt_get_exit_code() noexcept { return kLastExitCode; } +/***********************************************************************************/ +/// @brief crash current process. /***********************************************************************************/ void ProcessHeader::Crash() { - kcout << "ProcessScheduler: Crashed, ExitCode: -1.\r"; - MUST_PASS(ke_bug_check()); + kcout << this->Name << ": crashed. (id = " << number(39); + kcout << ")\r"; + + if (this->Ring != kRingUserKind) { + MUST_PASS(ke_bug_check()); + } - this->Exit(-1); + this->Exit(kErrorProcessFault); } void ProcessHeader::Wake(const bool should_wakeup) { -- cgit v1.2.3