github.com/castai/kvisor@v1.7.1-0.20240516114728-b3572a2607b5/pkg/ebpftracer/c/headers/common/kconfig.h (about) 1 #ifndef __COMMON_KCONFIG_H__ 2 #define __COMMON_KCONFIG_H__ 3 4 #include <vmlinux.h> 5 6 #include <common/common.h> 7 8 // TYPES 9 10 enum kconfig_key_e 11 { 12 ARCH_HAS_SYSCALL_WRAPPER = 1000U 13 }; 14 15 // PROTOTYPES 16 17 #define get_kconfig(x) get_kconfig_val(x) 18 19 // FUNCTIONS 20 21 statfunc int get_kconfig_val(u32 key) 22 { 23 u32 *config = bpf_map_lookup_elem(&kconfig_map, &key); 24 25 if (config == NULL) 26 return 0; 27 28 return *config; 29 } 30 31 #endif