Handle backspace for k210/qemu platform && Add lots of user tests.

This commit is contained in:
Yifan Wu 2020-12-11 01:44:07 +08:00
parent f69b3e11dd
commit 48a11e53ff
20 changed files with 361 additions and 35 deletions

17
user/src/bin/yield.rs Normal file
View file

@ -0,0 +1,17 @@
#![no_std]
#![no_main]
#[macro_use]
extern crate user_lib;
use user_lib::{getpid, yield_};
#[no_mangle]
pub fn main() -> i32 {
println!("Hello, I am process {}.", getpid());
for i in 0..5 {
yield_();
println!("Back in process {}, iteration {}.", getpid(), i);
}
println!("yield pass.");
0
}