From 587933c16132d880a06ff99bd087e64a3a04975e Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 25 Jan 2020 14:33:20 -0500 Subject: devdraw: use global drawlk instead of per-client Setting up for a real window system. --- src/cmd/devdraw/devdraw.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/cmd/devdraw/devdraw.h') diff --git a/src/cmd/devdraw/devdraw.h b/src/cmd/devdraw/devdraw.h index 1dac2d50..261d04d1 100644 --- a/src/cmd/devdraw/devdraw.h +++ b/src/cmd/devdraw/devdraw.h @@ -56,6 +56,8 @@ struct ClientImpl void (*rpc_flush)(Client*, Rectangle); }; +extern QLock drawlk; + struct Client { int rfd; @@ -69,10 +71,9 @@ struct Client char* wsysid; - // drawlk protects the draw data structures. + // drawlk protects the draw data structures for all clients. // It can be acquired by an RPC thread or a graphics thread // but must not be held on one thread while waiting for the other. - QLock drawlk; /*Ref r;*/ DImage* dimage[NHASH]; CScreen* cscreen; -- cgit v1.2.3