Add sys_yield tests and compile them to different location.

This commit is contained in:
Yifan Wu 2020-11-28 16:22:29 +08:00
parent 1414d05325
commit 4e8059e222
12 changed files with 99 additions and 57 deletions

18
user/src/bin/02write_c.rs Normal file
View file

@ -0,0 +1,18 @@
#![no_std]
#![no_main]
#[macro_use]
extern crate user_lib;
use user_lib::sys_yield;
#[no_mangle]
fn main() -> i32 {
for _ in 0..3 {
for _ in 0..10 { print!("C"); }
println!("");
sys_yield();
}
println!("Test write_c OK!");
0
}