Skip to content

Commit fac1168

Browse files
committed
clean code
1 parent 87d47a6 commit fac1168

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

core/src/scheduler.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ impl<'s> Scheduler<'s> {
227227
co.syscall(val, syscall, SyscallState::Callback)
228228
.expect("change syscall state failed");
229229
}
230-
//协程在系统调用执行期间被信号抢占,直接放回就绪队列
231-
CoroutineState::Syscall((), _, SyscallState::Executing) => {}
232230
_ => unreachable!("try_resume unexpect CoroutineState"),
233231
}
234232
self.ready.push(co);
@@ -391,23 +389,6 @@ impl<'s> Scheduler<'s> {
391389
}
392390
}
393391
}
394-
// Check for coroutines preempted during syscall execution (SIGURG race).
395-
// These have SyscallState::Executing and no syscall_suspend entry,
396-
// so they would be stuck in the syscall map forever without this.
397-
let executing: Vec<u64> = self
398-
.syscall
399-
.iter()
400-
.filter(|entry| {
401-
matches!(
402-
entry.value().state(),
403-
CoroutineState::Syscall((), _, SyscallState::Executing)
404-
)
405-
})
406-
.map(|entry| *entry.key())
407-
.collect();
408-
for co_id in executing {
409-
self.try_resume(co_id);
410-
}
411392
Ok(())
412393
}
413394

0 commit comments

Comments
 (0)