diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:18:59 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:18:59 -0800 |
| commit | dfc52b82fee5bc6713ecce3f81767a8565c4f874 (patch) | |
| tree | d48688e5ffd92742e5556791c1c8f086317203d5 /include/linux/list.h | |
| parent | a880f45a48be2956d2c78a839c472287d54435c1 (diff) | |
v2.4.9.11 -> v2.4.9.12
- Alan Cox: much more merging
- Pete Zaitcev: ymfpci race fixes
- Andrea Arkangeli: VM race fix and OOM tweak.
- Arjan Van de Ven: merge RH kernel fixes
- Andi Kleen: use more readable 'likely()/unlikely()' instead of __builtin_expect()
- Keith Owens: fix 64-bit ELF types
- Gerd Knorr: mark more broken PCI bridges, update btaudio driver
- Paul Mackerras: powermac driver update
- me: clean up PTRACE_DETACH to use common infrastructure
Diffstat (limited to 'include/linux/list.h')
| -rw-r--r-- | include/linux/list.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index 4a88363eeca4..81c9170a0f3a 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -153,6 +153,16 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea for (pos = (head)->next, prefetch(pos->next); pos != (head); \ pos = pos->next, prefetch(pos->next)) +/** + * list_for_each_safe - iterate over a list safe against removal of list entry + * @pos: the &struct list_head to use as a loop counter. + * @n: another &struct list_head to use as temporary storage + * @head: the head for your list. + */ +#define list_for_each_safe(pos, n, head) \ + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = n, n = pos->next) + #endif /* __KERNEL__ || _LVM_H_INCLUDE */ #endif |
