~kris/9p

9hist

73aa6a9430656ae5fc0c3edc2f264479fd9db2b5 — David du Colombier 31 years ago b891a67
Plan 9 from Bell Labs 1995-01-01
3 files changed, 12 insertions(+), 2 deletions(-)

M port/portdat.h
M port/proc.c
M port/qio.c
M port/portdat.h => port/portdat.h +1 -0
@@ 132,6 132,7 @@ struct Block
	uchar*	wp;			/* first empty byte */
	uchar*	lim;			/* 1 past the end of the buffer */
	uchar*	base;			/* start of the buffer */
	void	(*free)(Block*);
	ulong	flag;
};
#define BLEN(s)	((s)->wp - (s)->rp)

M port/proc.c => port/proc.c +3 -2
@@ 216,9 216,10 @@ loop:
		 *  processor can run given affinity constraints
		 */
		for(rq = &runq[Nrq-1]; rq >= runq; rq--){
			if(rq->head == 0)
			p = rq->head;
			if(p == 0)
				continue;
			for(p = rq->head; p; p = p->rnext){
			for(; p; p = p->rnext){
				if(p->mp == m || m->ticks - p->movetime > HZ/2)
					goto found;
			}

M port/qio.c => port/qio.c +8 -0
@@ 109,6 109,14 @@ iallocb(int size)
void
freeb(Block *b)
{
	/*
	 * drivers which perform non cache coherent DMA manage their
	 * own buffer pools, so they provide their own free routines.
	 */
	if(b->free) {
		b->free(b);
		return;
	}
	if(b->flag & BINTR) {
		ilock(&ialloc);
		ialloc.bytes -= b->lim - b->base;