~kris/9p

9hist

ae26e5d6f7adeb936a4592fb2889e483870ee9e9 — David du Colombier 23 years ago 4b3629d
Plan 9 from Bell Labs 2002-09-24
4 files changed, 21 insertions(+), 7 deletions(-)

M pc/trap.c
M port/devcons.c
M port/portdat.h
M port/segment.c
M pc/trap.c => pc/trap.c +1 -1
@@ 534,7 534,7 @@ fault386(Ureg* ureg, void*)
		return;
	read = !(ureg->ecode & 2);
	if(up == nil)
		panic("what? up is zero pc 0x%8.8lux\n", ureg->pc);
		panic("fault but up is zero; pc 0x%8.8lux addr 0x%8.8lux\n", ureg->pc, addr);
	insyscall = up->insyscall;
	up->insyscall = 1;
	n = fault(addr, read);

M port/devcons.c => port/devcons.c +1 -2
@@ 381,8 381,7 @@ echo(char *buf, int n)
			scheddump();
			return;
		case 'k':
			if(!cpuserver)
				killbig();
			killbig();
			return;
		case 'r':
			exit(0);

M port/portdat.h => port/portdat.h +2 -2
@@ 860,8 860,8 @@ struct Edfinterface {
	void		(*edfexpel)(Task*);
	char *	(*edfadmit)(Task*);
	void		(*edfdeadline)(Proc*);
	void		(*edfacquire)(Task*, CSN*);
	void		(*edfrelease)(Task*);
	void		(*resacquire)(Task*, CSN*);
	void		(*resrelease)(Task*);
};

/*

M port/segment.c => port/segment.c +17 -2
@@ 520,10 520,25 @@ mfreeseg(Segment *s, ulong start, int pages)
		}
		while(j < PTEPERTAB) {
			pg = s->map[i]->pages[j];
			/*
			 * We want to zero s->map[i]->page[j] and putpage(pg),
			 * but we have to make sure other processors flush the entry
			 * entry from their TLBs before the page is freed.
			 * We construct a list of the pages to be freed, zero
			 * the entries, then (below) call procflushseg, and call
			 * putpage on the whole list.
			 *
			 * Swapped-out pages don't appear in TLBs, so it's okay
			 * to putswap those pages before procflushseg.
			 */
			if(pg){
				if(onswap(pg))
					putswap(pg);
				else{
					pg->next = list;
					list = pg;
				}
				s->map[i]->pages[j] = 0;
				pg->next = list;
				list = pg;
			}
			if(--pages == 0)
				goto out;