Plan 9 from Bell Labs 1995-09-17
1 files changed, 3 insertions(+), 0 deletions(-) M port/qio.c
M port/qio.c => port/qio.c +3 -0
@@ 412,11 412,14 @@ qbread(Queue *q, int len) nb = b; if(n > len){ if((q->state&Qmsg) == 0){ + iunlock(q); + n -= len; b = allocb(n); memmove(b->wp, nb->rp+len, n); b->wp += n; + ilock(q); b->next = q->bfirst; if(q->bfirst == 0) q->blast = b;