Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d36d080
fix: put preempted Syscall(Executing) coroutines back in ready queue …
Copilot Apr 3, 2026
5581cff
fix: handle Syscall(Executing) in try_resume and check_ready instead …
Copilot Apr 3, 2026
df1da46
Merge branch 'master' into copilot/fix-coroutine-scheduler-bug
loongs-zhang Apr 3, 2026
9ecd4ea
fix: reorder change_state to log before notifying MonitorListener
Copilot Apr 3, 2026
a0a79f0
fix: translate change_state comment to bilingual Chinese/English
Copilot Apr 3, 2026
87d47a6
fix compile
loongs-zhang Apr 3, 2026
fac1168
clean code
loongs-zhang Apr 3, 2026
726199b
fix: conditionally reorder change_state to prevent both live-lock and…
Copilot Apr 3, 2026
4675117
fix: hook write with re-entrancy guard to prevent preemption during l…
Copilot Apr 3, 2026
ca70cd7
refactor: use impl_hook! for write and implement special facade in wr…
Copilot Apr 4, 2026
4384994
fix: reorder impl_facade! to transition state before logging, revert …
Copilot Apr 4, 2026
c49454d
move code
loongs-zhang Apr 4, 2026
7e7f4f5
refactor: move IN_FACADE re-entrancy guard from mod.rs to write.rs
Copilot Apr 4, 2026
dd487c2
fix: prevent SIGURG preemption live-lock by hooking write and reorder…
Copilot Apr 4, 2026
56f1551
revert: rollback all scheduler.rs changes per reviewer feedback
Copilot Apr 4, 2026
b0d1948
reorder
loongs-zhang Apr 4, 2026
adf7498
fix: bypass all layers (io_uring/NIO) in WriteSyscallFacade for stdou…
Copilot Apr 4, 2026
95378a2
code polish
loongs-zhang Apr 4, 2026
d0ff4dd
fix: add early bypass in write() dispatcher for stdout/stderr and rev…
Copilot Apr 4, 2026
3b8cf28
clean code
loongs-zhang Apr 4, 2026
f2a219a
clean code
loongs-zhang Apr 4, 2026
5ddf2ef
fix: conditionally reorder change_state for →Running to prevent live-…
Copilot Apr 4, 2026
6ad23ff
fix: skip SIGURG preemption for Syscall-state coroutines to prevent d…
Copilot Apr 4, 2026
0178f4e
fix: move Syscall guard from sigurg_handler to monitor_thread_main, c…
Copilot Apr 5, 2026
38e9537
fix: replace logically-wrong contains() with two-phase snapshot appro…
Copilot Apr 5, 2026
438c29e
perf: pre-allocate expired Vec outside monitor loop to avoid per-iter…
Copilot Apr 5, 2026
c62a624
enhance stability
loongs-zhang Apr 5, 2026
6ac5bf1
enhance stability
loongs-zhang Apr 6, 2026
b364319
Merge branch 'master' into copilot/fix-coroutine-scheduler-bug
loongs-zhang Apr 6, 2026
61c06af
fix: revert change_state conditional reorder and sigurg_handler Sysca…
Copilot Apr 6, 2026
3b2f5d2
fix: restore sigurg_handler Syscall state check to match master, prev…
Copilot Apr 6, 2026
570c679
fix: revert impl_facade!/WriteSyscallFacade reorder to match master —…
Copilot Apr 6, 2026
c2a87c9
less syscall
loongs-zhang Apr 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions core/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,17 @@ impl<'s> Scheduler<'s> {
_ = RUNNING_COROUTINES.remove(&co_id);
})? {
CoroutineState::Syscall((), _, state) => {
//挂起协程到系统调用表
//如果已包含,说明当前系统调用还有上层父系统调用,因此直接忽略插入结果
_ = self.syscall.insert(co_id, coroutine);
if let SyscallState::Suspend(timestamp) = state {
self.syscall_suspend
.push(SyscallSuspendItem { timestamp, co_id });
if let SyscallState::Executing = state {
//协程在系统调用执行期间被信号抢占,放回就绪队列以恢复执行
self.ready.push(coroutine);
} else {
//挂起协程到系统调用表
//如果已包含,说明当前系统调用还有上层父系统调用,因此直接忽略插入结果
_ = self.syscall.insert(co_id, coroutine);
if let SyscallState::Suspend(timestamp) = state {
self.syscall_suspend
.push(SyscallSuspendItem { timestamp, co_id });
}
Comment thread
loongs-zhang marked this conversation as resolved.
Outdated
}
}
CoroutineState::Suspend((), timestamp) => {
Expand Down
Loading