Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit b4dba4740fc561475051889470bfa4d671947ddb Author: Antonio Quartulli ordex@autistici.org Date: Sat Mar 16 11:57:42 2013 +0100
batman-adv: add RCU compat code for linux < 2.6.34
In linux version < 2.6.34 rcu_dereference_raw() does not exist and needs to be backported.
Signed-off-by: Antonio Quartulli ordex@autistici.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de
b4dba4740fc561475051889470bfa4d671947ddb compat.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/compat.h b/compat.h index a71be7d..3e81434 100644 --- a/compat.h +++ b/compat.h @@ -81,6 +81,12 @@ static inline void batadv_this_cpu_add(uint64_t *count_ptr, size_t count)
#define rcu_dereference_protected(p, c) (p)
+#define rcu_dereference_raw(p) ({ \ + typeof(p) _________p1 = ACCESS_ONCE(p); \ + smp_read_barrier_depends(); \ + (_________p1); \ + }) + #endif /* < KERNEL_VERSION(2, 6, 34) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)