M carrera/fns.h => carrera/fns.h +1 -1
@@ 3,7 3,7 @@
void DEBUG(void);
void addportintr(int(*)(void));
-#define affinity(x) (MACHP(0))
+#define affinity(x) m
void allflush(void*, ulong);
void arginit(void);
int busprobe(ulong);
M pc/fns.h => pc/fns.h +1 -1
@@ 1,7 1,7 @@
#include "../port/portfns.h"
void addconf(char*, char*);
-#define affinity(x) (MACHP(0))
+#define affinity(x) m
void bbinit(void);
void bigcursor(void);
void bootargs(ulong);
M port/portdat.h => port/portdat.h +1 -0
@@ 577,6 577,7 @@ struct Schedq
Lock;
Proc *head;
Proc *tail;
+ int n;
};
M port/proc.c => port/proc.c +3 -2
@@ 21,8 21,8 @@ struct
Waitq *free;
}waitqalloc;
-Schedq runhiq, runloq;
int nrdy;
+Schedq runhiq;
char *statename[] =
{ /* BUG: generate automatically */
@@ 126,7 126,7 @@ ready(Proc *p)
else
rq->head = p;
rq->tail = p;
-
+ rq->n++;
nrdy++;
p->state = Ready;
unlock(&runhiq);
@@ 160,6 160,7 @@ loop:
if(p->rnext == 0)
rq->tail = 0;
rq->head = p->rnext;
+ rq->n--;
nrdy--;
if(p->state != Ready)
print("runproc %s %d %s\n", p->text, p->pid, statename[p->state]);