bpf: Add BTF_ID_LIST_GLOBAL_SINGLE macro

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
This commit is contained in:
Daniel Xu
2021-08-23 19:43:46 -07:00
committed by Alexei Starovoitov
parent 3bbc8ee7c3
commit 1b07d00a15

View File

@@ -82,6 +82,9 @@ __BTF_ID_LIST(name, globl)
#define BTF_ID_LIST_SINGLE(name, prefix, typename) \ #define BTF_ID_LIST_SINGLE(name, prefix, typename) \
BTF_ID_LIST(name) \ BTF_ID_LIST(name) \
BTF_ID(prefix, typename) 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. * The BTF_ID_UNUSED macro defines 4 zero bytes.