target/hppa: Rename cond_make_* helpers
[qemu/armbru.git] / ebpf / ebpf.h
blob378d4e9c706ddf3f6eb0dcdfb54a3e0210438fd3
1 /*
2 * QEMU eBPF binary declaration routine.
4 * Developed by Daynix Computing LTD (http://www.daynix.com)
6 * Authors:
7 * Andrew Melnychenko <andrew@daynix.com>
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef EBPF_H
13 #define EBPF_H
16 void ebpf_register_binary_data(int id, const void *data,
17 size_t datalen);
18 const void *ebpf_find_binary_by_id(int id, size_t *sz,
19 struct Error **errp);
21 #define ebpf_binary_init(id, fn) \
22 static void __attribute__((constructor)) ebpf_binary_init_ ## fn(void) \
23 { \
24 size_t datalen = 0; \
25 const void *data = fn(&datalen); \
26 ebpf_register_binary_data(id, data, datalen); \
29 #endif /* EBPF_H */