* [B.A.T.M.A.N.] [PATCHv2] batman-adv: add RCU compat code for kernel < 2.6.37
@ 2013-03-16 11:49 Antonio Quartulli
2013-03-18 8:21 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2013-03-16 11:49 UTC (permalink / raw)
To: b.a.t.m.a.n
In linux version < 2.6.37 hlist_first_rcu() and hlist_next_rcu() do not exist
and therefore they need to be backported.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
compat.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/compat.h b/compat.h
index e1c6cd2..a71be7d 100644
--- a/compat.h
+++ b/compat.h
@@ -129,6 +129,12 @@ static inline int batadv_param_set_copystring(const char *val,
#endif /* < KERNEL_VERSION(2, 6, 36) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
+
+#define hlist_first_rcu(head) (*((struct hlist_node __rcu **)(&(head)->first)))
+#define hlist_next_rcu(node) (*((struct hlist_node __rcu **)(&(node)->next)))
+
+#endif /* < KERNEL_VERSION(2, 6, 37) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: add RCU compat code for kernel < 2.6.37
2013-03-16 11:49 [B.A.T.M.A.N.] [PATCHv2] batman-adv: add RCU compat code for kernel < 2.6.37 Antonio Quartulli
@ 2013-03-18 8:21 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-03-18 8:21 UTC (permalink / raw)
To: b.a.t.m.a.n
On Saturday, March 16, 2013 19:49:18 Antonio Quartulli wrote:
> In linux version < 2.6.37 hlist_first_rcu() and hlist_next_rcu() do not
> exist and therefore they need to be backported.
>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> compat.h | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied in revision 80e3bf8.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-18 8:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 11:49 [B.A.T.M.A.N.] [PATCHv2] batman-adv: add RCU compat code for kernel < 2.6.37 Antonio Quartulli
2013-03-18 8:21 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).