~kris/9p

9hist

c59f6df7286b4f0973cb685e876edc3b3e470ff9 — David du Colombier 30 years ago 4751b0a
Plan 9 from Bell Labs 1996-05-10
1 files changed, 4 insertions(+), 0 deletions(-)

M port/devmnt.c
M port/devmnt.c => port/devmnt.c +4 -0
@@ 763,19 763,23 @@ void
mntgate(Mnt *m)
{
	Mntrpc *q;
	int x;

	lock(m);
	m->rip = 0;
	for(q = m->queue; q; q = q->list) {
		if(q->done == 0) {
			x = splhi();	/* because sleep also does */
			lock(&q->r);
			if(q->r.p) {
				unlock(&q->r);
				splx(x);
				unlock(m);
				wakeup(&q->r);
				return;
			}
			unlock(&q->r);
			splx(x);
		}
	}
	unlock(m);