input update

This commit is contained in:
Able 2022-04-09 23:49:31 -05:00
parent f02eb25ca3
commit db7bd504e5
3 changed files with 7 additions and 5 deletions

Binary file not shown.

View file

@ -1,3 +1,3 @@
cargo build --release cargo build --release --target wasm32-unknown-unknown
wasm-strip target/wasm32-unknown-unknown/release/aos_wasm_stress_test.wasm mv target/wasm32-unknown-unknown/release/aos_wasm_stress_test.wasm aos_wasm_stress_test.wasm
mv target/wasm32-unknown-unknown/release/aos_wasm_stress_test.wasm aos_wasm_stress_test.wasm wasm-strip aos_wasm_stress_test.wasm

View file

@ -6,11 +6,13 @@ use libwasm::{driver::DriverExitCode, get_input};
#[no_mangle] #[no_mangle]
fn start() -> i32 { fn start() -> i32 {
let rand; let rand;
let ret; let mut ret;
unsafe { unsafe {
send_signal(PID(1), Signals::Quit); send_signal(PID(1), Signals::Quit);
rand = get_random(); rand = get_random();
ret = get_input(); loop {
ret = get_input();
}
} }
// rand as i32 // rand as i32