bpf: Add BTF_ID_LIST_GLOBAL_SINGLE macro
authorDaniel Xu <dxu@dxuuu.xyz>
Tue, 24 Aug 2021 02:43:46 +0000 (19:43 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 25 Aug 2021 17:37:05 +0000 (10:37 -0700)
Same as BTF_ID_LIST_SINGLE macro except defines a global ID.

Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/a867a97517df42fd3953eeb5454402b57e74538f.1629772842.git.dxu@dxuuu.xyz
include/linux/btf_ids.h

index bed4b99..6d13950 100644 (file)
@@ -82,6 +82,9 @@ __BTF_ID_LIST(name, globl)
 #define BTF_ID_LIST_SINGLE(name, prefix, typename)     \
        BTF_ID_LIST(name) \
        BTF_ID(prefix, typename)
+#define BTF_ID_LIST_GLOBAL_SINGLE(name, prefix, typename) \
+       BTF_ID_LIST_GLOBAL(name) \
+       BTF_ID(prefix, typename)
 
 /*
  * The BTF_ID_UNUSED macro defines 4 zero bytes.