1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/userland/aos_wasm_stress_test/src/main.rs
2022-02-26 07:35:36 -06:00

37 lines
621 B
Rust

#![no_std]
#![no_main]
#[no_mangle]
fn start() -> i32 {
let ret = unsafe { add(1, 2) };
unsafe {
send_signal(PID(1), Signals::Quit);
}
ret as i32
}
extern "C" {
/// Send a signal to a process
///
/// # Arguments
///
/// * `pid` - The PID of the process to send the signal to
/// * `signal` - The signal to send
pub fn send_signal(pid: PID, signal: Signals) -> bool;
}
use {
libwasm::process::{signals::Signals, PID},
libwasm::syscalls::add,
};
use libwasm::*;
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
use core::panic::PanicInfo;