M gnot/devcons.c => gnot/devcons.c +0 -2
@@ 203,8 203,6 @@ echo(int c)
if(c == 0x14)
DEBUG();
if(c == 0x16){
- incontoggle();
- urpdump();
dumpqueues();
}
if(raw.ref)
M gnot/stream.c => gnot/stream.c +5 -3
@@ 78,11 78,12 @@ dumpqueues(void)
continue;
for(count = 0, bp = q->first; bp; bp = bp->next)
count++;
- print("%s %ux R c %d l %d f %ux", q->info->name, q, count,
- q->len, q->flag);
+ print("%s %ux R c %d l %d f %ux r %ux", q->info->name, q, count,
+ q->len, q->flag, &(q->r));
for(count = 0, bp = WR(q)->first; bp; bp = bp->next)
count++;
- print(" W c %d l %d f %ux\n", count, WR(q)->len, WR(q)->flag);
+ print(" W c %d l %d f %ux r %ux\n", count, WR(q)->len, WR(q)->flag,
+ &(WR(q)->r));
}
print("\n");
for(bcp=bclass; bcp<&bclass[Nclass]; bcp++){
@@ 246,6 247,7 @@ allocq(Qinfo *qi)
q->len = q->nb = 0;
wq = q->other = q + 1;
+ wq->flag = QINUSE;
wq->r.p = 0;
wq->info = qi;
wq->put = qi->oput;
M gnot/sturp.c => gnot/sturp.c +1 -1
@@ 958,7 958,7 @@ urpvomit(char *msg, Urp* up)
print("\tiseq: %uo lastecho: %uo trx: %d trbuf: %uo %uo %uo\n",
up->iseq, up->lastecho, up->trx, up->trbuf[0], up->trbuf[1],
up->trbuf[2]);
- print("\tupq: %ux %d %d\n", up->rq->next->first, up->rq->next->nb,
+ print("\tupq: %ux %d %d\n", &up->rq->next->r, up->rq->next->nb,
up->rq->next->len);
}
M port/stream.c => port/stream.c +1 -0
@@ 246,6 246,7 @@ allocq(Qinfo *qi)
q->len = q->nb = 0;
wq = q->other = q + 1;
+ wq->flag = QINUSE;
wq->r.p = 0;
wq->info = qi;
wq->put = qi->oput;
M port/sturp.c => port/sturp.c +13 -1
@@ 950,6 950,9 @@ urpkproc(void *arg)
static void
urpvomit(char *msg, Urp* up)
{
+ Block *bp;
+ uchar *cp;
+
print("urpvomit: %s %ux next %d unechoed %d unacked %d nxb %d\n",
msg, up, up->next, up->unechoed, up->unacked, up->nxb);
print("\txb: %ux %ux %ux %ux %ux %ux %ux %ux\n",
@@ 958,8 961,17 @@ urpvomit(char *msg, Urp* up)
print("\tiseq: %uo lastecho: %uo trx: %d trbuf: %uo %uo %uo\n",
up->iseq, up->lastecho, up->trx, up->trbuf[0], up->trbuf[1],
up->trbuf[2]);
- print("\tupq: %ux %d %d\n", up->rq->next->first, up->rq->next->nb,
+ print("\tupq: %ux %d %d\n", &up->rq->next->r, up->rq->next->nb,
up->rq->next->len);
+ lock(up->rq->next);
+ for(bp = up->rq->next->first; bp; bp = bp->next){
+ print("%d%c:\t", bp->wptr - bp->rptr, (bp->flags&S_DELIM)?'D':' ');
+
+ for(cp = bp->rptr; cp<bp->wptr && cp<bp->rptr+10; cp++)
+ print(" %uo", *cp);
+ print("\n");
+ }
+ unlock(up->rq->next);
}
int