Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
list.h File Reference

Go to the source code of this file.

Data Structures

struct  list
 

Macros

#define list_entry(link, type, member)   ((type *)((char *)(link)-(unsigned long)(&((type *)0)->member)))
 
#define list_head(list, type, member)   list_entry((list)->next, type, member)
 
#define list_tail(list, type, member)   list_entry((list)->prev, type, member)
 
#define list_next(elm, member)   list_entry((elm)->member.next, typeof(*elm), member)
 
#define list_for_each_entry(pos, list, member)
 

Macro Definition Documentation

#define list_entry (   link,
  type,
  member 
)    ((type *)((char *)(link)-(unsigned long)(&((type *)0)->member)))

Definition at line 46 of file list.h.

#define list_for_each_entry (   pos,
  list,
  member 
)
Value:
for (pos = list_head(list, typeof(*pos), member); \
&pos->member != (list); \
pos = list_next(pos, member))

Definition at line 58 of file list.h.

#define list_head (   list,
  type,
  member 
)    list_entry((list)->next, type, member)

Definition at line 49 of file list.h.

#define list_next (   elm,
  member 
)    list_entry((elm)->member.next, typeof(*elm), member)

Definition at line 55 of file list.h.

#define list_tail (   list,
  type,
  member 
)    list_entry((list)->prev, type, member)

Definition at line 52 of file list.h.