Small fix
This commit is contained in:
parent
199e3df019
commit
f5600da622
|
@ -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 {
|
||||
|
|
|
@ -2,7 +2,6 @@ mod handler;
|
|||
mod timer;
|
||||
|
||||
pub use handler::TrapFrame;
|
||||
pub use timer::set_next_timeout;
|
||||
|
||||
/// 初始化中断相关的子模块
|
||||
///
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue