ref: 2fb5fbbd73a1c861bdc7326ece8035ffb35f7093
parent: f2919dfd14e9c0ec58d0f9b1accab63080ec07f4
parent: 0ad4ceb8d08c53b126ecd60e9d5f0afbad134c4c
author: cinap_lenrek <[email protected]>
date: Mon Dec 21 19:47:53 EST 2020
merge
--- a/sys/src/9/port/proc.c
+++ b/sys/src/9/port/proc.c
@@ -1036,8 +1036,8 @@
Proc *p[NBROKEN];
}broken;
-void
-addbroken(Proc *p)
+static void
+addbroken(void)
{
qlock(&broken);
if(broken.n == NBROKEN) {
@@ -1045,12 +1045,12 @@
memmove(&broken.p[0], &broken.p[1], sizeof(Proc*)*(NBROKEN-1));
--broken.n;
}
- broken.p[broken.n++] = p;
+ broken.p[broken.n++] = up;
qunlock(&broken);
edfstop(up);
- p->state = Broken;
- p->psstate = nil;
+ up->state = Broken;
+ up->psstate = nil;
sched();
}
@@ -1182,7 +1182,7 @@
}
if(!freemem)
- addbroken(up);
+ addbroken();
qlock(&up->debug);