summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/ProcessScheduler.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-02 07:48:20 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-02 07:48:20 +0200
commitb5db67d19105b958f59a683a81a00a8cbf91a0e1 (patch)
treea85f3bf12ea68380391cc7050bd3deb37cb73b66 /Private/Source/ProcessScheduler.cxx
parentd2b31db9d2c9a70592ebed05cd73352f9b9d194b (diff)
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 <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/Source/ProcessScheduler.cxx')
-rw-r--r--Private/Source/ProcessScheduler.cxx12
1 files changed, 9 insertions, 3 deletions
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
@@ -33,12 +33,18 @@ STATIC Int32 kLastExitCode = 0U;
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) {