rustubs/kthread/meeseeks.rs
1//! a noisy dummy task to test the system
2use crate::kthread::KThread;
3use crate::proc::task::Task;
4
5pub struct Meeseeks {}
6
7impl KThread for Meeseeks {
8 fn entry() -> ! {
9 let t = Task::current().unwrap();
10 sprintln!("I'm Mr.Meeseeks {}, look at me~", t.pid);
11 let mm = &t.mm;
12 for vma in &mm.vmas {
13 println!("{:#?}", vma);
14 }
15 loop {
16 let t = Task::current().unwrap();
17 sprintln!("I'm {}", t.pid);
18 t.nanosleep(2_000_000_000);
19 }
20 }
21}