提交 e85465e4 编写于 作者: I Ilya Leoshkevich 提交者: Alexei Starovoitov

libbpf: Simplify barrier_var()

Use a single "+r" constraint instead of the separate "=r" and "0".
Signed-off-by: NIlya Leoshkevich <iii@linux.ibm.com>
Link: https://lore.kernel.org/r/20230128000650.1516334-22-iii@linux.ibm.comSigned-off-by: NAlexei Starovoitov <ast@kernel.org>
上级 1b5e3853
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
* This is a variable-specific variant of more global barrier(). * This is a variable-specific variant of more global barrier().
*/ */
#ifndef barrier_var #ifndef barrier_var
#define barrier_var(var) asm volatile("" : "=r"(var) : "0"(var)) #define barrier_var(var) asm volatile("" : "+r"(var))
#endif #endif
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册