From: Alfredo Alvarez Fernandez Date: Fri, 19 Feb 2016 06:48:51 +0000 (+0100) Subject: tools/lib/lockdep: Add userspace version of READ_ONCE() X-Git-Tag: next-20160307~39^2~15^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9d5a23ac8e0ede14a2b23740d231727ba5be483a;p=karo-tx-linux.git tools/lib/lockdep: Add userspace version of READ_ONCE() This was added to the kernel code in <1658d35ead5d> ("list: Use READ_ONCE() when testing for empty lists"). There's nothing special we need to do about it in userspace. Signed-off-by: Alfredo Alvarez Fernandez Cc: Andrew Morton Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Sasha Levin Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1455864533-7536-2-git-send-email-alfredoalvarezernandez@gmail.com Signed-off-by: Ingo Molnar --- diff --git a/tools/lib/lockdep/uinclude/linux/compiler.h b/tools/lib/lockdep/uinclude/linux/compiler.h index 6386dc3182a0..fd3e56a83fc2 100644 --- a/tools/lib/lockdep/uinclude/linux/compiler.h +++ b/tools/lib/lockdep/uinclude/linux/compiler.h @@ -3,6 +3,7 @@ #define __used __attribute__((__unused__)) #define unlikely +#define READ_ONCE(x) (x) #define WRITE_ONCE(x, val) x=(val) #define RCU_INIT_POINTER(p, v) p=(v)