update
This commit is contained in:
parent
00e0ee6a2e
commit
f02eb25ca3
|
@ -1,17 +1,21 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
use libwasm::driver::DriverExitCode;
|
use libwasm::{driver::DriverExitCode, get_input};
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
fn start() -> i32 {
|
fn start() -> i32 {
|
||||||
let rand;
|
let rand;
|
||||||
|
let ret;
|
||||||
unsafe {
|
unsafe {
|
||||||
send_signal(PID(1), Signals::Quit);
|
send_signal(PID(1), Signals::Quit);
|
||||||
rand = get_random();
|
rand = get_random();
|
||||||
|
ret = get_input();
|
||||||
}
|
}
|
||||||
|
|
||||||
rand as i32
|
// rand as i32
|
||||||
|
|
||||||
|
ret as i32
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub mod syscalls;
|
||||||
pub use core::*;
|
pub use core::*;
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
||||||
pub fn get_random() -> u32;
|
pub fn get_random() -> u32;
|
||||||
|
pub fn get_input() -> u32;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue