Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/poison.h>
#include <linux/const.h>
Go to the source code of this file.
#define hlist_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr,type,member) |
#define hlist_for_each_entry_continue | ( | tpos, | |
pos, | |||
member | |||
) |
hlist_for_each_entry_continue - iterate over a hlist continuing after current point : the type * to use as a loop cursor. : the &struct hlist_node to use as a loop cursor. : the name of the hlist_node within the struct.
#define hlist_for_each_entry_from | ( | tpos, | |
pos, | |||
member | |||
) |
hlist_for_each_entry_from - iterate over a hlist continuing from current point : the type * to use as a loop cursor. : the &struct hlist_node to use as a loop cursor. : the name of the hlist_node within the struct.
hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry : the type * to use as a loop cursor. : the &struct hlist_node to use as a loop cursor.
: another &struct hlist_node to use as temporary storage : the head for your list. : the name of the hlist_node within the struct.
#define list_entry | ( | ptr, | |
type, | |||
member | |||
) | container_of(ptr, type, member) |
list_for_each_entry_safe_continue - continue list iteration safe against removal : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Iterate over list of given type, continuing after current point, safe against removal of list entry.
list_for_each_entry_safe_from - iterate over list from current point safe against removal : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Iterate over list of given type from current point, safe against removal of list entry.
list_for_each_entry_safe_reverse - iterate backwards over list safe against removal : the type * to use as a loop cursor.
: another type * to use as temporary storage : the head for your list. : the name of the list_struct within the struct.
Iterate backwards over list of given type, safe against removal of list entry.
list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() : the type * to use as a start point : the head of the list : the name of the list_struct within the struct.
Prepares a pos entry for use as a start point in list_for_each_entry_continue().
#define list_safe_reset_next | ( | pos, | |
n, | |||
member | |||
) | n = list_entry(pos->member.next, typeof(*pos), member) |
list_safe_reset_next - reset a stale list_for_each_entry_safe loop : the loop cursor used in the list_for_each_entry_safe loop
: temporary storage used in list_for_each_entry_safe : the name of the list_struct within the struct.
list_safe_reset_next is not safe to use in general if the list may be modified concurrently (eg. the lock is dropped in the loop body). An exception to this is if the cursor element (pos) is pinned in the list, and list_safe_reset_next is called after re-taking the lock and before completing the current iteration of the loop body.