Scheduler: do not reboot on PID 1 exit if we are in a test

This commit is contained in:
apio 2022-10-22 11:56:08 +02:00
parent 27a18a608c
commit 6816a5b11f

View File

@ -279,7 +279,14 @@ void sched_common_exit(Context* context, int64_t status)
return true;
});
}
else { reboot(); }
else
{
#ifndef RUN_TEST_AS_INIT
reboot();
#else
hang();
#endif
}
Scheduler::task_yield(context);
}