svn commit: r329514 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Sun Feb 18 09:10:15 UTC 2018


Author: hselasky
Date: Sun Feb 18 09:10:14 2018
New Revision: 329514
URL: https://svnweb.freebsd.org/changeset/base/329514

Log:
  Implement the rcu_dereference_raw() function macro.
  Make sure all RCU dereferencing use the READ_ONCE() function macro.
  
  MFC after:	1 week
  Submitted by:	Johannes Lundberg <johalun0 at gmail.com>
  Sponsored by:	Mellanox Technologies
  Sponsored by:	Limelight Networks

Modified:
  head/sys/compat/linuxkpi/common/include/linux/rcupdate.h

Modified: head/sys/compat/linuxkpi/common/include/linux/rcupdate.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/rcupdate.h	Sun Feb 18 08:58:20 2018	(r329513)
+++ head/sys/compat/linuxkpi/common/include/linux/rcupdate.h	Sun Feb 18 09:10:14 2018	(r329514)
@@ -74,13 +74,16 @@
 } while (0)
 
 #define	rcu_access_pointer(p)			\
-	((__typeof(*p) *)(READ_ONCE(p)))
+	((__typeof(*p) *)READ_ONCE(p))
 
 #define	rcu_dereference_protected(p, c)		\
-	((__typeof(*p) *)(p))
+	((__typeof(*p) *)READ_ONCE(p))
 
 #define	rcu_dereference(p)			\
 	rcu_dereference_protected(p, 0)
+
+#define	rcu_dereference_raw(p)			\
+	((__typeof(*p) *)READ_ONCE(p))
 
 #define	rcu_pointer_handoff(p) (p)
 


More information about the svn-src-head mailing list