summaryrefslogtreecommitdiff
path: root/tools/lib/bpf/bpf_helpers.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2020-04-01 13:26:12 +0300
committerJiri Kosina <jkosina@suse.cz>2020-04-01 13:26:12 +0300
commitc9f289701540baeef9ac7c9977d67a7259f404db (patch)
treeac3c29d41da02ac735c9a12da78905842fbccd2f /tools/lib/bpf/bpf_helpers.h
parent0aac6f9aaae5fba08963651d2ce49930145e118f (diff)
parent910a7e89cec65efad254c947ce2bf8bf5b370962 (diff)
downloadlinux-c9f289701540baeef9ac7c9977d67a7259f404db.tar.xz
Merge branch 'for-5.7/appleir' into for-linus
- small code cleanups in hid-appleir from Lucas Tanure
Diffstat (limited to 'tools/lib/bpf/bpf_helpers.h')
-rw-r--r--tools/lib/bpf/bpf_helpers.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf_helpers.h b/tools/lib/bpf/bpf_helpers.h
index 0c7d28292898..f69cc208778a 100644
--- a/tools/lib/bpf/bpf_helpers.h
+++ b/tools/lib/bpf/bpf_helpers.h
@@ -25,6 +25,9 @@
#ifndef __always_inline
#define __always_inline __attribute__((always_inline))
#endif
+#ifndef __weak
+#define __weak __attribute__((weak))
+#endif
/*
* Helper structure used by eBPF C program
@@ -44,4 +47,12 @@ enum libbpf_pin_type {
LIBBPF_PIN_BY_NAME,
};
+enum libbpf_tristate {
+ TRI_NO = 0,
+ TRI_YES = 1,
+ TRI_MODULE = 2,
+};
+
+#define __kconfig __attribute__((section(".kconfig")))
+
#endif