aux/wacom: fix race in read queue

this fixes `no concurrent reads, please' errors when using
aux/wacom with aux/tablet on eg. x61t
This commit is contained in:
qwx 2021-12-14 23:54:05 +00:00
parent 7efbea82c6
commit af561602ea

View file

@ -303,11 +303,13 @@ tabletread(Req* req)
reply(req, m);
msgdecref(m);
} else {
lock(&readers);
if(r->req) {
respond(req, "no concurrent reads, please");
} else {
r->req = req;
}
unlock(&readers);
}
}