implement ExitProcess for Windows

This commit is contained in:
Ralf Jung
2019-04-21 13:25:24 +02:00
parent d410b13139
commit 6a6c0cd5f0
+4
View File
@@ -78,6 +78,10 @@ fn emulate_foreign_item(
let code = this.read_scalar(args[0])?.to_i32()?;
return err!(Exit(code));
}
"ExitProcess" => {
let code = this.read_scalar(args[0])?.to_u32()?;
return err!(Exit(code as i32));
}
_ => if dest.is_none() {
return err!(Unimplemented(
format!("can't call diverging foreign function: {}", link_name),