Kernel: Restart if init exits

This commit is contained in:
apio 2022-10-19 20:33:41 +02:00
parent 7e9744419e
commit 51665a04b7

View File

@ -7,6 +7,7 @@
#include "memory/PMM.h"
#include "memory/VMM.h"
#include "misc/hang.h"
#include "misc/reboot.h"
#include "misc/utils.h"
#include "panic/Panic.h"
#include "std/assert.h"
@ -280,6 +281,7 @@ void Scheduler::task_exit(Context* context, int64_t status)
return true;
});
}
else { reboot(); }
task_yield(context);
}
@ -298,6 +300,7 @@ void Scheduler::task_misbehave(Context* context, int64_t status)
return true;
});
}
else { reboot(); }
task_yield(context);
}