From 6c6a562a55aac04c6b8b86b1231996da4c0cac20 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 3 Jun 1998 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1998-06-03 --- pc/l.s | 2 +- port/devaudio.c | 12 ++++++++++++ port/proc.c | 2 +- port/taslock.c | 3 +++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pc/l.s b/pc/l.s index 27d05590f7bc995f7c05c2e12df8588eba939193..e32df2dbde9f70c3abdffc11c18166741637c7a6 100644 --- a/pc/l.s +++ b/pc/l.s @@ -504,7 +504,7 @@ TEXT setlabel(SB), $0 /* * Interrupt/exception handling. * Each entry in the vector table calls either _strayintr or _strayintrx depending - * on whether an error code has beemn automatically pushed onto the stack + * on whether an error code has been automatically pushed onto the stack * (_strayintrx) or not, in which case a dummy entry must be pushed before retrieving * the trap type from the vector table entry and placing it on the stack as part * of the Ureg structure. diff --git a/port/devaudio.c b/port/devaudio.c index cf38aee22d230a866bbcc317bbe2fa25dea91b88..2bfe81388fb4070081d75772b5ec055dba0e5fce 100644 --- a/port/devaudio.c +++ b/port/devaudio.c @@ -879,6 +879,18 @@ audioclose(Chan *c) case Qaudio: if(c->flag & COPEN) { qlock(&audio); + if (audio.amode == Awrite) { + /* flush out last partial buffer */ + Buf *b = audio.filling; + if (b) { + audio.filling = 0; + memset(b->virt, 0, Bufsize-audio.curcount); + swab(b->virt); + putbuf(&audio.full, b); + } + if (!audio.active && audio.full.first) + pokeaudio(); + } audio.amode = Aclosed; if(waserror()){ qunlock(&audio); diff --git a/port/proc.c b/port/proc.c index a852c61d0da34ca8ddad9b8d6ce370f7040236dc..17c596d40438a13b7ec59878fe7dee41fb70e396 100644 --- a/port/proc.c +++ b/port/proc.c @@ -266,7 +266,7 @@ found: p->state = Scheding; if(p->mp != MACHP(m->machno)) - p->movetime = m->ticks + HZ/2; + p->movetime = m->ticks + HZ/10; p->mp = MACHP(m->machno); return p; } diff --git a/port/taslock.c b/port/taslock.c index b3f21e6fbc0102860a7fc456bee508d7e8cf4fac..0add04a5d10fa96b7451a9d7765cf5dcde4f761d 100644 --- a/port/taslock.c +++ b/port/taslock.c @@ -111,6 +111,9 @@ iunlock(Lock *l) { ulong sr; + if(l->key == 0) + print("iunlock: not locked: pc %uX\n", getcallerpc(l)); + sr = l->sr; l->pc = 0; l->key = 0;