op_list.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  list_head

Defines

#define list_entry(ptr, type, member)   ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
#define list_for_each(pos, head)   for (pos = (head)->next; pos != (head); pos = pos->next)
#define list_for_each_safe(pos, n, head)
#define LIST_HEAD_INIT(name)   { &(name), &(name) }
#define LIST_HEAD(name)   struct list_head name = LIST_HEAD_INIT(name)

Functions

static __inline__ void list_init (struct list_head *ptr)
static __inline__ void __list_add (struct list_head *new_entry, struct list_head *prev, struct list_head *next)
static __inline__ void list_add (struct list_head *new_entry, struct list_head *head)
static __inline__ void list_add_tail (struct list_head *new_entry, struct list_head *head)
static __inline__ void __list_del (struct list_head *prev, struct list_head *next)
static __inline__ void list_del (struct list_head *entry)
static __inline__ void list_del_init (struct list_head *entry)
static __inline__ int list_empty (struct list_head const *head)
static __inline__ void list_splice (struct list_head *list, struct list_head *head)

Detailed Description

Kernel-style lists

Remarks:
Copyright 2002 OProfile authors
Read the file COPYING
Author:
Linux kernel authors

Definition in file op_list.h.


Define Documentation

#define list_entry ( ptr,
type,
member   )     ((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
#define list_for_each ( pos,
head   )     for (pos = (head)->next; pos != (head); pos = pos->next)
#define list_for_each_safe ( pos,
n,
head   ) 
Value:
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

Parameters:
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.

Definition at line 169 of file op_list.h.

Referenced by _add_jitdumps_to_deletion_list(), _cleanup_jitdumps(), arch_filter_events(), clear_anon_maps(), delete_counter_arc(), delete_path_names_list(), do_lru(), filter_anon_samples_list(), for_each_sfile(), for_one_sfile(), op_free_events(), op_process_jit_dumpfiles(), opd_24_sfile_lru_clear(), opd_clear_module_info(), opd_clear_modules(), opd_for_each_image(), opd_for_each_proc(), opd_get_proc(), opd_kill_maps(), opd_remove_kernel_mapping(), operf_free_modules_list(), operf_sfile_lru_clear(), and sfile_lru_clear().

#define LIST_HEAD ( name   )     struct list_head name = LIST_HEAD_INIT(name)

Definition at line 175 of file op_list.h.

Referenced by op_process_jit_dumpfiles().

#define LIST_HEAD_INIT ( name   )     { &(name), &(name) }

Definition at line 173 of file op_list.h.


Function Documentation

static __inline__ void __list_add ( struct list_head new_entry,
struct list_head prev,
struct list_head next 
) [static]

Definition at line 46 of file op_list.h.

References list_head::next, and list_head::prev.

Referenced by list_add(), and list_add_tail().

Here is the caller graph for this function:

static __inline__ void __list_del ( struct list_head prev,
struct list_head next 
) [static]

Definition at line 89 of file op_list.h.

References list_head::next, and list_head::prev.

Referenced by list_del(), and list_del_init().

Here is the caller graph for this function:

static __inline__ void list_add ( struct list_head new_entry,
struct list_head head 
) [static]

list_add - add a new entry

Parameters:
new new entry to be added
head list head to add it after

Insert a new entry after the specified head. This is good for implementing stacks.

Definition at line 64 of file op_list.h.

References __list_add(), and list_head::next.

Referenced by _add_jitdumps_to_deletion_list(), add_image_filter(), find_anon_mapping(), find_cookie(), get_file(), get_pathname(), ibs_sfile_get(), is_cookie_ignored(), odb_open(), opd_create_module(), opd_get_proc(), opd_new_image(), opd_new_proc(), operf_create_module(), operf_sfile_find(), and sfile_find().

Here is the call graph for this function:

Here is the caller graph for this function:

static __inline__ void list_add_tail ( struct list_head new_entry,
struct list_head head 
) [static]

list_add_tail - add a new entry

Parameters:
new new entry to be added
head list head to add it before

Insert a new entry before the specified head. This is useful for implementing queues.

Definition at line 77 of file op_list.h.

References __list_add(), and list_head::prev.

Referenced by add_anon_mapping(), build_counter_arc(), new_event(), new_unit_mask(), opd_24_sfile_lru(), opd_add_mapping(), opd_open_24_sample_file(), operf_sfile_put(), and sfile_put().

Here is the call graph for this function:

Here is the caller graph for this function:

static __inline__ void list_del ( struct list_head entry  )  [static]

list_del - deletes entry from list.

Parameters:
entry the element to delete from the list. Note: list_empty on entry does not return true after this, the entry is in an undefined state.

Definition at line 101 of file op_list.h.

References __list_del(), list_head::next, and list_head::prev.

Referenced by _cleanup_jitdumps(), clear_anon_maps(), delete_counter_arc(), delete_event(), delete_pathname(), delete_unit_mask(), do_lru(), filter_anon_samples_list(), find_anon_mapping(), for_one_sfile(), free_event(), free_unit_mask(), kill_sfile(), odb_close(), opd_24_sfile_lru(), opd_close_image_samples_files(), opd_delete_image(), opd_delete_proc(), opd_get_proc(), opd_kill_maps(), opd_open_24_sample_file(), opd_remove_kernel_mapping(), operf_free_modules_list(), operf_sfile_get(), and sfile_get().

Here is the call graph for this function:

Here is the caller graph for this function:

static __inline__ void list_del_init ( struct list_head entry  )  [static]

list_del_init - deletes entry from list and reinitialize it.

Parameters:
entry the element to delete from the list.

Definition at line 110 of file op_list.h.

References __list_del(), list_init(), list_head::next, and list_head::prev.

Referenced by opd_24_sfile_lru_clear().

Here is the call graph for this function:

Here is the caller graph for this function:

static __inline__ int list_empty ( struct list_head const *  head  )  [static]

list_empty - tests whether a list is empty

Parameters:
head the list to test.

Definition at line 120 of file op_list.h.

References list_head::next.

Referenced by load_events(), op_process_jit_dumpfiles(), opd_24_sfile_lru_clear(), opd_add_mapping(), opd_get_ascii_maps(), operf_sfile_lru_clear(), and sfile_lru_clear().

Here is the caller graph for this function:

static __inline__ void list_init ( struct list_head ptr  )  [static]
static __inline__ void list_splice ( struct list_head list,
struct list_head head 
) [static]

list_splice - join two lists

Parameters:
list the new list to add.
head the place to add it in the first list.

Definition at line 130 of file op_list.h.

References list_head::next, and list_head::prev.


Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1