code: plan9front

Download patch

ref: c309f466eff33a331f9a8d8c8b18cfe613c1d3f4
parent: 92ce2cfea6a6bff967cc6f3f9b71b74df2305f6a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Mar 28 17:34:02 EDT 2024

kernel: bring back cooperating scheduling

In commit eaffa1ef55825c34e138246fe5db5bbf996a8dbb
(which fixed some bugs in the efd scheduling code),
the cooperating scheduling got removed accidentially.

This was not the intention, so bring it back.

--- a/sys/src/9/port/proc.c
+++ b/sys/src/9/port/proc.c
@@ -458,6 +458,8 @@
 		splx(s);
 		return;
 	case 0:
+		if(up != p && (p->wired == nil || p->wired == MACHP(m->machno)))
+			m->readied = p;	/* group scheduling */
 		pri = reprioritize(p);
 		break;
 	case 1: