use super::File; use alloc::{sync::Arc, vec::Vec}; use alloc::string::{String, ToString}; use crate::mm::{ UserBuffer, }; use super::TaskStatus; // TODO 类型? #[repr(C)] pub struct ProcInfo{ // name: pub pid:usize, pub name: String, //pub ppid:usize, // heap_sz: // mem: // cpu_time: pub status:TaskStatus, } pub struct ProcInfoList{ pub inner:Vec, } /*impl ProcInfoList{ pub fn init(&self)->Self{ } }*/ impl File for ProcInfoList{ fn readable(&self) -> bool { true } fn writable(&self) -> bool { false } /// 这个函数做的事是把信息放到buffer里面 fn read(&self, buf: UserBuffer) -> usize { //buf = self.inner; 19260817 } fn write(&self, buf: UserBuffer) -> usize { println!("写你妈"); 19260817 } }