commit
02a3880e34
@ -1 +1 @@
|
||||
nightly-2022-01-19
|
||||
nightly-2022-04-11
|
||||
|
@ -0,0 +1,22 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
#[macro_use]
|
||||
extern crate user_lib;
|
||||
extern crate alloc;
|
||||
|
||||
use user_lib::{thread_create, exit};
|
||||
use alloc::vec::Vec;
|
||||
|
||||
pub fn thread_a() -> ! {
|
||||
for i in 0..1000 { print!("{}", i); }
|
||||
exit(1)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn main() -> i32 {
|
||||
thread_create(thread_a as usize, 0);
|
||||
println!("main thread exited.");
|
||||
exit(0)
|
||||
}
|
||||
|
Loading…
Reference in new issue