summaryrefslogtreecommitdiff
path: root/tools/testing/memblock/linux
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/memblock/linux')
-rw-r--r--tools/testing/memblock/linux/mutex.h14
-rw-r--r--tools/testing/memblock/linux/string_helpers.h10
2 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/memblock/linux/mutex.h b/tools/testing/memblock/linux/mutex.h
new file mode 100644
index 000000000000..ae3f497165d6
--- /dev/null
+++ b/tools/testing/memblock/linux/mutex.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _MUTEX_H
+#define _MUTEX_H
+
+#define DEFINE_MUTEX(name) int name
+
+static inline void dummy_mutex_guard(int *name)
+{
+}
+
+#define guard(mutex) \
+ dummy_##mutex##_guard
+
+#endif /* _MUTEX_H */ \ No newline at end of file
diff --git a/tools/testing/memblock/linux/string_helpers.h b/tools/testing/memblock/linux/string_helpers.h
new file mode 100644
index 000000000000..dbf015cfff31
--- /dev/null
+++ b/tools/testing/memblock/linux/string_helpers.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_STRING_HELPERS_H_
+#define _LINUX_STRING_HELPERS_H_
+
+/*
+ * Header stub to avoid test build breakage; we don't need to
+ * actually implement string_get_size() as it's not used in the tests.
+ */
+
+#endif