~kris/9p

9hist

9d212eb8ad51fe0d56a4ec7e83a054801d2bd2db — David du Colombier 31 years ago e5fe916
Plan 9 from Bell Labs 1995-01-12
3 files changed, 12 insertions(+), 5 deletions(-)

M port/devcons.c
M port/netif.c
M port/proc.c
M port/devcons.c => port/devcons.c +6 -1
@@ 24,6 24,7 @@ static struct
	char	c;
	int	count;
	int	repeat;
	int	ctlpoff;
} kbd;




@@ 185,7 186,7 @@ echo(Rune r, char *buf, int n)
	/*
	 * ^p hack
	 */
	if(r==0x10 && cpuserver)
	if(r==0x10 && cpuserver && !kbd.ctlpoff)
		exit(0);

	/*


@@ 732,6 733,10 @@ conswrite(Chan *c, void *va, long n, ulong offset)
			} else if(strncmp(a, "rawoff", 6) == 0){
				kbd.raw = 0;
				kbd.x = 0;
			} else if(strncmp(a, "ctlpon", 6) == 0){
				kbd.ctlpoff = 0;
			} else if(strncmp(a, "ctlpoff", 7) == 0){
				kbd.ctlpoff = 1;
			}
			if(a = strchr(a, ' '))
				a++;

M port/netif.c => port/netif.c +1 -1
@@ 159,7 159,7 @@ netifread(Netif *nif, Chan *c, void *a, long n, ulong offset)
{
	int i, j;
	Netfile *f;
	char buf[256];
	char buf[512];

	if(c->qid.path&CHDIR)
		return devdirread(c, a, n, (Dirtab*)nif, 0, netifgen);

M port/proc.c => port/proc.c +5 -3
@@ 64,7 64,7 @@ schedinit(void)		/* never returns */
			up->state = Dead;
			/* 
			 * Holding locks from pexit:
			 * 	procalloc, debug, palloc
			 * 	procalloc
			 */
			mmurelease(up);



@@ 884,6 884,7 @@ void
procctl(Proc *p)
{
	char *state;
	ulong s;

	switch(p->procctl) {
	case Proc_exitme:


@@ 900,7 901,7 @@ procctl(Proc *p)
		state = p->psstate;
		p->psstate = "Stopped";
		/* free a waiting debugger */
		spllo();
		s = spllo();
		qlock(&p->debug);
		if(p->pdbg) {
			wakeup(&p->pdbg->sleep);


@@ 909,8 910,9 @@ procctl(Proc *p)
		qunlock(&p->debug);
		splhi();
		p->state = Stopped;
		sched();		/* sched returns spllo() */
		sched();
		p->psstate = state;
		splx(s);
		return;
	}
}