lib9p reqqueue: remove setjmp shit

This commit is contained in:
aiju 2011-08-19 16:24:44 +02:00
parent f031d82662
commit 9574793fc7
2 changed files with 2 additions and 29 deletions

View file

@ -46,7 +46,6 @@ struct Reqqueue
Queueelem;
int pid;
Req *cur;
jmp_buf flush;
};
struct Fid

View file

@ -5,18 +5,9 @@
#include <9p.h>
static int
_reqqueuenote(void *uregs, char *note)
_reqqueuenote(void *, char *note)
{
Reqqueue *q;
if(strcmp(note, "flush") != 0)
return 0;
q = *threaddata();
if(q != nil){
q->cur = nil;
notejmp(uregs, q->flush, 1);
}
return 1;
return strcmp(note, "flush") == 0;
}
static void
@ -43,10 +34,6 @@ _reqqueueproc(void *v)
memset(&r->qu, 0, sizeof(r->qu));
qunlock(&r->lk);
q->cur = r;
if(setjmp(q->flush)){
respond(r, "interrupted");
continue;
}
qunlock(q);
f(r);
}
@ -98,16 +85,3 @@ reqqueueflush(Reqqueue *q, Req *r)
respond(r, "interrupted");
}
}
int
reqqueueflushed(void)
{
Reqqueue *q;
q = *threaddata();
qlock(q);
if(setjmp(q->flush))
return 1;
qunlock(q);
return 0;
}