From bfc6e606f63093e77242be5112644ffd2b6790ed Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 22 Aug 1995 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1995-08-22 --- pc/devether.c | 10 ++++------ pc/devrtc.c | 10 +++------- pc/l.s | 21 +++++++++++++++------ pc/vgaark2000pv.c | 8 ++++---- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/pc/devether.c b/pc/devether.c index 6a2632866c25fa390e15095e19edc81e30a5ac02..6665b230d32d100b5e9581f977162d3fed1eff5d 100644 --- a/pc/devether.c +++ b/pc/devether.c @@ -88,9 +88,8 @@ etherbread(Chan *c, long n, ulong offset) } void -etherremove(Chan *c) +etherremove(Chan*) { - USED(c); } void @@ -145,7 +144,7 @@ etherwloop(Ether *ctlr, Etherpkt *pkt, long len) int s, different; different = memcmp(pkt->d, ctlr->ea, sizeof(pkt->d)); - if(!ctlr->prom && different && memcmp(pkt->d, ctlr->bcast, sizeof(pkt->d))) + if(different && memcmp(pkt->d, ctlr->bcast, sizeof(pkt->d))) return 0; s = splhi(); @@ -156,11 +155,10 @@ etherwloop(Ether *ctlr, Etherpkt *pkt, long len) } long -etherwrite(Chan *c, void *buf, long n, ulong offset) +etherwrite(Chan *c, void *buf, long n, ulong) { Ether *ctlr; - USED(offset); if(n > ETHERMAXTU) error(Ebadarg); ctlr = ether[c->dev]; @@ -177,8 +175,8 @@ etherwrite(Chan *c, void *buf, long n, ulong offset) nexterror(); } n = (*ctlr->write)(ctlr, buf, n); - poperror(); qunlock(&ctlr->tlock); + poperror(); return n; } diff --git a/pc/devrtc.c b/pc/devrtc.c index b010d4aaddcfffe05e2f2ceeb8b3afb2bb3c36ce..c28cbff266afe50b3524fd59ed2d74790b6dd46d 100644 --- a/pc/devrtc.c +++ b/pc/devrtc.c @@ -113,9 +113,8 @@ rtccreate(Chan*, char*, int, ulong) } void -rtcclose(Chan *c) +rtcclose(Chan*) { - USED(c); } #define GETBCD(o) ((bcdclock[o]&0xf) + 10*(bcdclock[o]>>4)) @@ -218,7 +217,6 @@ rtcwrite(Chan *c, void *buf, long n, ulong offset) uchar bcdclock[Nbcd]; char *cp, *ep; - USED(c); if(offset!=0) error(Ebadarg); @@ -288,16 +286,14 @@ rtcbwrite(Chan *c, Block *bp, ulong offset) } void -rtcremove(Chan *c) +rtcremove(Chan*) { - USED(c); error(Eperm); } void -rtcwstat(Chan *c, char *dp) +rtcwstat(Chan*, char*) { - USED(c, dp); error(Eperm); } diff --git a/pc/l.s b/pc/l.s index d3798aaeeb218e4dd6fa6ff9c6095569e06cfbec..9442c0ab9fe4245c26b83a552666d48daccdf72c 100644 --- a/pc/l.s +++ b/pc/l.s @@ -555,24 +555,33 @@ intrscommon: /* * interrupt level is interrupts on or off */ -TEXT spllo(SB),$0 - PUSHFL - POPL AX - STI - RET - TEXT splhi(SB),$0 + MOVL m(SB), AX /* save PC in m->splpc */ + MOVL (SP), BX + MOVL BX, 4(AX) + PUSHFL POPL AX CLI RET TEXT splx(SB),$0 + MOVL m(SB), AX /* save PC in m->splpc */ + MOVL (SP), BX + MOVL BX, 4(AX) + MOVL s+0(FP),AX PUSHL AX POPFL RET +TEXT spllo(SB),$0 + PUSHFL + POPL AX + STI +TEXT spldone(SB), $0 + RET + TEXT getstatus(SB),$0 PUSHFL POPL AX diff --git a/pc/vgaark2000pv.c b/pc/vgaark2000pv.c index 682f61a37cf5ee8fd5874d94b9dada04a0cfebde..be4e139799098dea717bedfc439e64f22450e81c 100644 --- a/pc/vgaark2000pv.c +++ b/pc/vgaark2000pv.c @@ -154,16 +154,16 @@ move(Point p) */ if((x = p.x+hotpoint.x) < 0){ xo = -x; - x = 1; + x = 0; } else - xo = 1; + xo = 0; if((y = p.y+hotpoint.y) < 0){ yo = -y; - y = 1; + y = 0; } else - yo = 1; + yo = 0; /* * Load the new values.