mirror of
https://gitee.com/openharmony/third_party_libbpf
synced 2024-10-07 06:23:25 +00:00
cb658e9724
This patch makes sure we build AF_XDP-related code as part of libbpf. This also required copying few uapi/linux headers and adding few used definitions in include headers. Signed-off-by: Andrii Nakryiko <andriin@fb.com>
19 lines
472 B
C
19 lines
472 B
C
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
|
|
#ifndef _TOOLS_LINUX_RING_BUFFER_H_
|
|
#define _TOOLS_LINUX_RING_BUFFER_H_
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
static inline __u64 ring_buffer_read_head(struct perf_event_mmap_page *base)
|
|
{
|
|
return smp_load_acquire(&base->data_head);
|
|
}
|
|
|
|
static inline void ring_buffer_write_tail(struct perf_event_mmap_page *base,
|
|
__u64 tail)
|
|
{
|
|
smp_store_release(&base->data_tail, tail);
|
|
}
|
|
|
|
#endif /* _TOOLS_LINUX_RING_BUFFER_H_ */
|