Kernel-style lists. More...

Go to the source code of this file.
Classes | |
| struct | list_head |
Defines | |
| #define | list_entry(ptr, type, member) ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) |
| list_entry - get the struct for this entry | |
| #define | list_for_each(pos, head) for (pos = (head)->next; pos != (head); pos = pos->next) |
| list_for_each - iterate over a list | |
| #define | list_for_each_safe(pos, n, head) |
| list_for_each_safe - iterate over a list safe against removal of list entry | |
| #define | LIST_HEAD_INIT(name) { &(name), &(name) } |
| #define | LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name) |
Kernel-style lists.
| #define list_entry | ( | ptr, | |||
| type, | |||||
| member | ) | ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member))) |
list_entry - get the struct for this entry
| ptr | the &struct list_head pointer. | |
| type | the type of the struct this is embedded in. | |
| member | the name of the list_struct within the struct. |
Referenced by find_anon_mapping(), find_cookie(), find_event_by_name(), find_kernel_image(), is_cookie_ignored(), is_image_ignored(), main(), op_check_events(), op_free_events(), opd_clear_module_info(), opd_for_each_image(), opd_get_proc(), opd_handle_fork(), opd_kill_maps(), opd_sync_samples_files(), operf_find_kernel_image(), operf_free_modules_list(), operf_sfile_find(), operf_sfile_lru_clear(), sfile_find(), sfile_lru_clear(), and verbose_cookie().
| #define list_for_each | ( | pos, | |||
| head | ) | for (pos = (head)->next; pos != (head); pos = pos->next) |
list_for_each - iterate over a list
| pos | the &struct list_head to use as a loop counter. | |
| head | the head for your list. |
Referenced by find_anon_mapping(), find_cookie(), find_event_by_name(), find_kernel_image(), is_cookie_ignored(), is_image_ignored(), main(), op_check_events(), opd_handle_fork(), opd_sync_samples_files(), operf_find_kernel_image(), operf_sfile_find(), sfile_find(), and verbose_cookie().
| #define list_for_each_safe | ( | pos, | |||
| n, | |||||
| head | ) |
for (pos = (head)->next, n = pos->next; pos != (head); \
pos = n, n = 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. |
Referenced by op_free_events(), opd_clear_module_info(), opd_for_each_image(), opd_get_proc(), opd_kill_maps(), operf_free_modules_list(), operf_sfile_lru_clear(), and sfile_lru_clear().
| #define LIST_HEAD | ( | name | ) | struct list_head name = LIST_HEAD_INIT(name) |
| #define LIST_HEAD_INIT | ( | name | ) | { &(name), &(name) } |
1.6.1