summaryrefslogtreecommitdiff
path: root/src/sna/compiler.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-08 11:25:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-08 18:12:04 +0000
commit3620cd2d157f3d81ccb76bce2ab813bd1e058878 (patch)
tree2dfa40305de48cec77bf9c985fd804d89a37a2fd /src/sna/compiler.h
parentaeaadb16093f83c9b830958c5946d4d048ffd26b (diff)
sna: Begin hooking up valgrind/memcheck
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/compiler.h')
-rw-r--r--src/sna/compiler.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/compiler.h b/src/sna/compiler.h
index 0b113102..2c8b43da 100644
--- a/src/sna/compiler.h
+++ b/src/sna/compiler.h
@@ -40,4 +40,12 @@
#define fastcall
#endif
+#ifdef HAVE_VALGRIND_H
+#define VG(x) x
+#else
+#define VG(x)
+#endif
+
+#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
+
#endif /* _SNA_COMPILER_H_ */