~kris/9p

9hist

1849bbb87d5c77d48b7f8600ac6c421b8dc05122 — David du Colombier 32 years ago 73d3712
Plan 9 from Bell Labs 1994-03-20
2 files changed, 10 insertions(+), 9 deletions(-)

M port/proc.c
M port/qio.c
M port/proc.c => port/proc.c +6 -6
@@ 113,6 113,12 @@ newcallback(void (*func)(void))
		m->cbin = m->calls;
}

int
anyready(void)
{
	return m->hiq.head != 0 || m->loq.head != 0;
}

void
callbacks(void)
{


@@ 126,12 132,6 @@ callbacks(void)
	}
}

int
anyready(void)
{
	return m->hiq.head != 0 || m->loq.head != 0;
}

void
ready(Proc *p)
{

M port/qio.c => port/qio.c +4 -3
@@ 165,6 165,8 @@ iallockproc(void *arg)
				else
					cl->goal += i;
				cl->wanted = 0;
				if(cl->goal > 5000)
					cl->goal = 5000;
			}

			first = 0;


@@ 202,10 204,9 @@ qinit(void)
	/* start with a bunch of initial blocks */
	for(pow = Minpow; pow <= Maxpow; pow++){
		cl = &arena.alloc[pow];
		cl->goal = 0;
		cl->goal = 4;
		if(pow < 12)
			cl->goal = Maxpow-pow + 32;

		cl->first = 0;
		for(; cl->have < cl->goal; cl->have++){
			p = malloc(1<<pow);


@@ 397,7 398,7 @@ qpass(Queue *q, Block *b)
		if(len <= 0 || (q->state & Qmsg)){
			unlock(q);
			wakeup(&q->rr);
			ifree(b);
			free(b);
			splx(s);
			return i;
		}