mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-10 13:00:46 +08:00
libbpf: Add __percpu_kptr macro definition
Add __percpu_kptr macro definition in bpf_helpers.h. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20230827152800.1998492-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
1 parent
2dbdd3b564
commit
332198af03
1 file changed
+1
@@ -181,6 +181,7 @@ enum libbpf_tristate {
|
|||||||
#define __ksym __attribute__((section(".ksyms")))
|
#define __ksym __attribute__((section(".ksyms")))
|
||||||
#define __kptr_untrusted __attribute__((btf_type_tag("kptr_untrusted")))
|
#define __kptr_untrusted __attribute__((btf_type_tag("kptr_untrusted")))
|
||||||
#define __kptr __attribute__((btf_type_tag("kptr")))
|
#define __kptr __attribute__((btf_type_tag("kptr")))
|
||||||
|
#define __percpu_kptr __attribute__((btf_type_tag("percpu_kptr")))
|
||||||
|
|
||||||
#define bpf_ksym_exists(sym) ({ \
|
#define bpf_ksym_exists(sym) ({ \
|
||||||
_Static_assert(!__builtin_constant_p(!!sym), #sym " should be marked as __weak"); \
|
_Static_assert(!__builtin_constant_p(!!sym), #sym " should be marked as __weak"); \
|
||||||
|
|||||||
Reference in new issue
Block a user