Fix kstop and kreset.
This commit is contained in:
@@ -50,26 +50,6 @@ pub fn exit(status: usize) -> ! {
|
||||
context.id
|
||||
};
|
||||
|
||||
// TODO: Find a better way to implement this, perhaps when the init process calls exit.
|
||||
if pid == ContextId::from(1) {
|
||||
println!("Main kernel thread exited with status {:X}", status);
|
||||
|
||||
extern "C" {
|
||||
fn kreset() -> !;
|
||||
fn kstop() -> !;
|
||||
}
|
||||
|
||||
if status == SIGTERM {
|
||||
unsafe {
|
||||
kreset();
|
||||
}
|
||||
} else {
|
||||
unsafe {
|
||||
kstop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Files must be closed while context is valid so that messages can be passed
|
||||
for (_fd, file_opt) in close_files.into_iter().enumerate() {
|
||||
if let Some(file) = file_opt {
|
||||
|
||||
Reference in New Issue
Block a user