Handle backspace for k210/qemu platform && Add lots of user tests.
This commit is contained in:
parent
f69b3e11dd
commit
48a11e53ff
20 changed files with 361 additions and 35 deletions
17
user/src/bin/yield.rs
Normal file
17
user/src/bin/yield.rs
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue