1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
5 * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 #ifndef _LTTNG_WRAPPER_COMPILER_H
9 #define _LTTNG_WRAPPER_COMPILER_H
11 #include <linux/compiler.h>
14 * Don't allow compiling with buggy compiler.
20 * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
23 # if GCC_VERSION >= 40800 && GCC_VERSION <= 40802
24 # error Your gcc version produces clobbered frame accesses
30 * READ/WRITE_ONCE were introduced in kernel 3.19 and ACCESS_ONCE
31 * was removed in 4.15. Prefer READ/WRITE but fallback to ACCESS
32 * when they are not available.
35 # define READ_ONCE(x) ACCESS_ONCE(x)
39 # define WRITE_ONCE(x, val) ({ ACCESS_ONCE(x) = val; })
42 #endif /* _LTTNG_WRAPPER_COMPILER_H */
This page took 0.029475 seconds and 4 git commands to generate.