From: Martin Peschke <mp3@de.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, ak@suse.de, hch@infradead.org,
arjan@infradead.org, James.Smart@Emulex.Com,
James.Bottomley@SteelEye.com
Subject: [RFC] [Patch 1/8] statistics infrastructure - prerequisite: list operation
Date: Tue, 16 May 2006 19:44:38 +0200 [thread overview]
Message-ID: <446A0F86.9070806@de.ibm.com> (raw)
This patch adds another list_for_each_* derivate. I can't work around it
because there is a list that I need to search both ways.
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
---
list.h | 12 ++++++++++++
1 files changed, 12 insertions(+)
diff -Nurp a/include/linux/list.h b/include/linux/list.h
--- a/include/linux/list.h 2006-05-15 12:42:12.000000000 +0200
+++ b/include/linux/list.h 2006-05-15 17:26:16.000000000 +0200
@@ -411,6 +411,18 @@ static inline void list_splice_init(stru
pos = list_entry(pos->member.next, typeof(*pos), member))
/**
+ * list_for_each_entry_continue_reverse - iterate backwards over list
+ * of given type continuing before existing point
+ * @pos: the type * to use as a loop counter.
+ * @head: the head for your list.
+ * @member: the name of the list_struct within the struct.
+ */
+#define list_for_each_entry_continue_reverse(pos, head, member) \
+ for (pos = list_entry(pos->member.prev, typeof(*pos), member); \
+ prefetch(pos->member.prev), &pos->member != (head); \
+ pos = list_entry(pos->member.prev, typeof(*pos), member))
+
+/**
* list_for_each_entry_from - iterate over list of given type
* continuing from existing point
* @pos: the type * to use as a loop counter.
reply other threads:[~2006-05-16 17:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446A0F86.9070806@de.ibm.com \
--to=mp3@de.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=James.Smart@Emulex.Com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®