brintos

brintos / linux-shallow public Read only

0
0
Text · 484 B · 6049d9c Raw
33 lines · c
1// SPDX-License-Identifier: GPL-2.02 3#include <linux/bpf.h>4#include <bpf/bpf_helpers.h>5#include <bpf/bpf_tracing.h>6 7char _license[] SEC("license") = "GPL";8 9int test_1_result = 0;10 11SEC("?struct_ops/test_1")12int BPF_PROG(foo)13{14	test_1_result = 42;15	return 0;16}17 18SEC("?struct_ops/test_1")19int BPF_PROG(bar)20{21	test_1_result = 24;22	return 0;23}24 25struct bpf_testmod_ops {26	int (*test_1)(void);27};28 29SEC(".struct_ops.link")30struct bpf_testmod_ops testmod_1 = {31	.test_1 = (void *)bar32};33