16 fprint(2, "increfreq %p %ld\n", r, r->ref.ref);
22 allocreqpool(void (*destroy)(Req*))
26 f = emalloc9p(sizeof *f);
27 f->map = allocmap(increqref);
33 freereqpool(Reqpool *p)
35 freemap(p->map, (void(*)(void*))p->destroy);
40 allocreq(Reqpool *pool, ulong tag)
44 r = emalloc9p(sizeof *r);
50 if(caninsertkey(pool->map, tag, r) == 0){
60 lookupreq(Reqpool *pool, ulong tag)
63 fprint(2, "lookupreq %lud\n", tag);
64 return lookupkey(pool->map, tag);
76 fprint(2, "closereq %p %ld\n", r, r->ref.ref);
78 if(decref(&r->ref) == 0){
87 for(i=0; i<r->nflush; i++)
88 respond(r->flush[i], nil);
90 switch(r->ifcall.type){
108 removereq(Reqpool *pool, ulong tag)
111 fprint(2, "removereq %lud\n", tag);
112 return deletekey(pool->map, tag);