aos_userland/aos_wasm_stress_test/src/main.rs
2022-04-09 23:27:16 -05:00

36 lines
538 B
Rust

#![no_std]
#![no_main]
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
ret as i32
}
#[no_mangle]
fn driver_entry() {}
#[no_mangle]
fn driver_exit() -> DriverExitCode {
DriverExitCode::Success
}
use {
libwasm::get_random,
libwasm::process::{signals::Signals, PID},
libwasm::syscalls::send_signal,
};
mod panic;