lkml.org 
[lkml]   [2013]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 05/12] VFS hot tracking, rcu: introduce one rcu macro for list
Date
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

This rcu macro for list will be used in seq_list
rcu interfaces.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
include/linux/rculist.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 8089e35..a3fa055 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -218,6 +218,11 @@ static inline void list_splice_init_rcu(struct list_head *list,
at->prev = last;
}

+#define __list_for_each_rcu(pos, head) \
+ for (pos = rcu_dereference(list_next_rcu(head)); \
+ pos != head; \
+ pos = rcu_dereference(list_next_rcu(pos)))
+
/**
* list_entry_rcu - get the struct for this entry
* @ptr: the &struct list_head pointer.
--
1.7.11.7


\
 
 \ /
  Last update: 2013-05-14 03:21    [W:0.093 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site