can be added to the run queue but also procs in state SRUN. The latter
happens when schedcpu() kicks in before the proc had a chance to run.
Problem spotted by gkoehler@
OK cheloha@
-/* $OpenBSD: kern_sched.c,v 1.82 2023/08/03 16:12:08 claudio Exp $ */
+/* $OpenBSD: kern_sched.c,v 1.83 2023/08/05 12:41:04 claudio Exp $ */
/*
* Copyright (c) 2007, 2008 Artur Grabowski <art@openbsd.org>
*
KASSERT(ci != NULL);
SCHED_ASSERT_LOCKED();
- KASSERT(!ISSET(p->p_flag, P_WSLEEP) || p->p_stat == SSTOP);
p->p_cpu = ci;
p->p_stat = SRUN;