Small fix

This commit is contained in:
luojia65 2021-03-11 10:49:07 +08:00
parent 199e3df019
commit f5600da622
3 changed files with 2 additions and 4 deletions

View File

@ -30,8 +30,7 @@ where
// poll our future and give it a waker
let mut context = Context::from_waker(&*waker);
// println!("Poll begin");
crate::trap::set_next_timeout(); // 开始计时,如果运行超时,切换上下文
let ret = task.future.lock().as_mut().poll(&mut context);
// println!("Ret = {:?}", ret);
if let Poll::Pending = ret {

View File

@ -2,7 +2,6 @@ mod handler;
mod timer;
pub use handler::TrapFrame;
pub use timer::set_next_timeout;
/// 初始化中断相关的子模块
///

View File

@ -11,7 +11,7 @@ pub fn init() {
static INTERVAL: usize = 100000;
pub fn set_next_timeout() {
fn set_next_timeout() {
set_timer(time::read() + INTERVAL);
}