mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-20 13:06:33 +00:00
Rewrite exit()
and exit_group()
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5efc32b6ea
commit
35c20620bc
@ -150,14 +150,14 @@ fn init_thread() {
|
||||
)
|
||||
.expect("Run init process failed.");
|
||||
// Wait till initproc become zombie.
|
||||
while !initproc.is_zombie() {
|
||||
while !initproc.status().is_zombie() {
|
||||
// We don't have preemptive scheduler now.
|
||||
// The long running init thread should yield its own execution to allow other tasks to go on.
|
||||
Thread::yield_now();
|
||||
}
|
||||
|
||||
// TODO: exit via qemu isa debug device should not be the only way.
|
||||
let exit_code = if initproc.exit_code() == 0 {
|
||||
let exit_code = if initproc.status().exit_code() == 0 {
|
||||
QemuExitCode::Success
|
||||
} else {
|
||||
QemuExitCode::Failed
|
||||
|
Reference in New Issue
Block a user