From 9376799bd623d3e547afc2d31483f1cb44c2ba65 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 7 Feb 2019 08:42:50 -0800 Subject: iris: Use READ_ONCE and WRITE_ONCE for snapshots_landed Suggested by Chris Wilson, if only to make it obvious to the human readers that these are volatile reads. It may also be necessary for the compiler in a few cases. --- src/gallium/drivers/iris/iris_screen.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gallium/drivers/iris/iris_screen.h') diff --git a/src/gallium/drivers/iris/iris_screen.h b/src/gallium/drivers/iris/iris_screen.h index 8bf10996c3f..77fbd906b73 100644 --- a/src/gallium/drivers/iris/iris_screen.h +++ b/src/gallium/drivers/iris/iris_screen.h @@ -33,6 +33,9 @@ struct iris_bo; +#define READ_ONCE(x) (*(volatile __typeof__(x) *)&(x)) +#define WRITE_ONCE(x, v) *(volatile __typeof__(x) *)&(x) = (v) + #define IRIS_MAX_TEXTURE_SAMPLERS 32 #define IRIS_MAX_SOL_BUFFERS 4 -- cgit v1.2.3