From 98f12fd750ef277f85dcd5e9cab6bf3ac4911b1b Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 10 Feb 2024 09:18:57 -0700 Subject: [PATCH] Hack to workaround hangs by pinning to one cpu --- src/context/switch.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/context/switch.rs b/src/context/switch.rs index a213836168..abd78195d0 100644 --- a/src/context/switch.rs +++ b/src/context/switch.rs @@ -29,6 +29,11 @@ unsafe fn update_runnable(context: &mut Context, cpu_id: LogicalCpuId) -> bool { return false; } + //TODO: HACK TO WORKAROUND HANGS BY PINNING TO ONE CPU + if !context.cpu_id.map_or(true, |x| x == cpu_id) { + return false; + } + // Restore from signal, must only be done from another context to avoid overwriting the stack! if context.ksig_restore { let was_singlestep = ptrace::regs_for(context)