aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/include/skiboot-valgrind.h
diff options
context:
space:
mode:
Diffstat (limited to 'roms/skiboot/include/skiboot-valgrind.h')
-rw-r--r--roms/skiboot/include/skiboot-valgrind.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/roms/skiboot/include/skiboot-valgrind.h b/roms/skiboot/include/skiboot-valgrind.h
new file mode 100644
index 000000000..c9cd7cb35
--- /dev/null
+++ b/roms/skiboot/include/skiboot-valgrind.h
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
+/* Copyright 2017 IBM Corp. */
+
+#ifndef __SKIBOOT_VALGRIND_H
+#define __SKIBOOT_VALGRIND_H
+
+#ifdef USE_VALGRIND
+#include <valgrind/valgrind.h>
+#include <valgrind/memcheck.h>
+#else
+
+#define RUNNING_ON_VALGRIND 0
+
+#define VALGRIND_MAKE_MEM_UNDEFINED(p, len) \
+ do { \
+ (void)(p); \
+ (void)(len); \
+ } while (0)
+
+#endif
+
+#endif /* __SKIBOOT_VALGRIND_H */