Commit c2fab41d authored by FTL OS's avatar FTL OS
Browse files

修改调度

parent 1667b2fa
No related merge requests found
Showing with 6 additions and 11 deletions
+6 -11
......@@ -138,12 +138,7 @@ pub fn kmain(_hart_id: usize) -> ! {
sstatus::clear_sum();
}
let entry_id = ENTER_CNT.fetch_add(1, Ordering::Relaxed);
if entry_id == 2 {
loop {
while memory::own_try_handle() {}
// timer::set_next_trigger_ex(Duration::from_micros(10));
}
}
let mut spin_end: Option<Instant> = None;
loop {
if executor::run_until_idle() != 0 {
......@@ -153,17 +148,17 @@ pub fn kmain(_hart_id: usize) -> ! {
spin_end = None;
continue;
}
if entry_id != 0 {
while memory::own_try_handle() {
spin_end = None;
}
}
#[cfg(feature = "submit")]
{
if entry_id < 2 {
continue;
}
}
if entry_id == 3 {
while memory::own_try_handle() {
spin_end = None;
}
}
let now = timer::now();
match spin_end {
None => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment