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:
parent
7efbea82c6
commit
af561602ea
1 changed files with 2 additions and 0 deletions
|
@ -303,11 +303,13 @@ tabletread(Req* req)
|
||||||
reply(req, m);
|
reply(req, m);
|
||||||
msgdecref(m);
|
msgdecref(m);
|
||||||
} else {
|
} else {
|
||||||
|
lock(&readers);
|
||||||
if(r->req) {
|
if(r->req) {
|
||||||
respond(req, "no concurrent reads, please");
|
respond(req, "no concurrent reads, please");
|
||||||
} else {
|
} else {
|
||||||
r->req = req;
|
r->req = req;
|
||||||
}
|
}
|
||||||
|
unlock(&readers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue