diff options
author | Russ Cox <rsc@swtch.com> | 2020-01-25 14:33:20 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2020-05-17 23:24:29 -0400 |
commit | 587933c16132d880a06ff99bd087e64a3a04975e (patch) | |
tree | 8f84eff9d7b1587c63d8e44631dc3ea6abd9d526 /src/cmd/devdraw/devdraw.h | |
parent | 94d381ec9d579e5336f3817b68cf4d1a8a7333db (diff) | |
download | plan9port-587933c16132d880a06ff99bd087e64a3a04975e.tar.gz plan9port-587933c16132d880a06ff99bd087e64a3a04975e.tar.bz2 plan9port-587933c16132d880a06ff99bd087e64a3a04975e.zip |
devdraw: use global drawlk instead of per-client
Setting up for a real window system.
Diffstat (limited to 'src/cmd/devdraw/devdraw.h')
-rw-r--r-- | src/cmd/devdraw/devdraw.h | 5 |
1 files changed, 3 insertions, 2 deletions
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; |