From f02eb25ca310c3ed260cbd6171bf2e9f47ef84a3 Mon Sep 17 00:00:00 2001 From: Able Date: Sat, 9 Apr 2022 23:27:16 -0500 Subject: [PATCH] update --- aos_wasm_stress_test/src/main.rs | 8 ++++++-- libwasm/src/lib.rs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/aos_wasm_stress_test/src/main.rs b/aos_wasm_stress_test/src/main.rs index 0f0d312..639a082 100644 --- a/aos_wasm_stress_test/src/main.rs +++ b/aos_wasm_stress_test/src/main.rs @@ -1,17 +1,21 @@ #![no_std] #![no_main] -use libwasm::driver::DriverExitCode; +use libwasm::{driver::DriverExitCode, get_input}; #[no_mangle] fn start() -> i32 { let rand; + let ret; unsafe { send_signal(PID(1), Signals::Quit); rand = get_random(); + ret = get_input(); } - rand as i32 + // rand as i32 + + ret as i32 } #[no_mangle] diff --git a/libwasm/src/lib.rs b/libwasm/src/lib.rs index 6491508..4faa490 100644 --- a/libwasm/src/lib.rs +++ b/libwasm/src/lib.rs @@ -9,7 +9,7 @@ pub mod syscalls; pub use core::*; extern "C" { - pub fn get_random() -> u32; + pub fn get_input() -> u32; }