Debian Codegraph @

include/linux/ring_buffer.h

raw
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
2 #ifndef _TOOLS_LINUX_RING_BUFFER_H_
3 #define _TOOLS_LINUX_RING_BUFFER_H_
4
5 #include <linux/compiler.h>
6
7 static inline __u64 ring_buffer_read_head(struct perf_event_mmap_page *base)
8 {
9 return smp_load_acquire(&base->data_head);
10 }
11
12 static inline void ring_buffer_write_tail(struct perf_event_mmap_page *base,
13 __u64 tail)
14 {
15 smp_store_release(&base->data_tail, tail);
16 }
17
18 #endif /* _TOOLS_LINUX_RING_BUFFER_H_ */