From af561602ea37d595b29ef7a2e5a2538148f66636 Mon Sep 17 00:00:00 2001 From: qwx Date: Tue, 14 Dec 2021 23:54:05 +0000 Subject: [PATCH] aux/wacom: fix race in read queue this fixes `no concurrent reads, please' errors when using aux/wacom with aux/tablet on eg. x61t --- sys/src/cmd/aux/wacom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/src/cmd/aux/wacom.c b/sys/src/cmd/aux/wacom.c index 876d4ab15..cbf77a9dd 100644 --- a/sys/src/cmd/aux/wacom.c +++ b/sys/src/cmd/aux/wacom.c @@ -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); } }