ref: af561602ea37d595b29ef7a2e5a2538148f66636
parent: 7efbea82c63846a281db36d3854e13d3ab5498d2
author: qwx <[email protected]>
date: Tue Dec 14 18:54:05 EST 2021
aux/wacom: fix race in read queue this fixes `no concurrent reads, please' errors when using aux/wacom with aux/tablet on eg. x61t
--- a/sys/src/cmd/aux/wacom.c
+++ b/sys/src/cmd/aux/wacom.c
@@ -303,11 +303,13 @@
reply(req, m);
msgdecref(m);
} else {
+ lock(&readers);
if(r->req) {
respond(req, "no concurrent reads, please");
} else {
r->req = req;
}
+ unlock(&readers);
}
}