From 9d212eb8ad51fe0d56a4ec7e83a054801d2bd2db Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 12 Jan 1995 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1995-01-12 --- port/devcons.c | 7 ++++++- port/netif.c | 2 +- port/proc.c | 8 +++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/port/devcons.c b/port/devcons.c index 1b53f2ccb4e0c8d3e408080ebdea6f0323bfd8c1..7e4e0ff7b2e77b51eaa19b671c1c19e57eb4c56d 100644 --- a/port/devcons.c +++ b/port/devcons.c @@ -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++; diff --git a/port/netif.c b/port/netif.c index c579d11f8a9e9b846e8259a9e6f411e899cc1ab7..9761a0a162b955d60cee0a6032506eebf970f3aa 100644 --- a/port/netif.c +++ b/port/netif.c @@ -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); diff --git a/port/proc.c b/port/proc.c index 9c20b566713cfe64f89c047f3a00eed3a1427647..f11a2305cbc1352f7288c72e1213a718ebdbbcfe 100644 --- a/port/proc.c +++ b/port/proc.c @@ -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; } }