Linux Perf
intlist.h File Reference
#include <linux/rbtree.h>
#include <stdbool.h>
#include "rblist.h"
Include dependency graph for intlist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  int_node
 
struct  intlist
 

Macros

#define intlist__for_each_entry(pos, ilist)   for (pos = intlist__first(ilist); pos; pos = intlist__next(pos))
 
#define intlist__for_each_entry_safe(pos, n, ilist)
 

Functions

struct intlistintlist__new (const char *slist)
 
void intlist__delete (struct intlist *ilist)
 
void intlist__remove (struct intlist *ilist, struct int_node *in)
 
int intlist__add (struct intlist *ilist, int i)
 
struct int_nodeintlist__entry (const struct intlist *ilist, unsigned int idx)
 
struct int_nodeintlist__find (struct intlist *ilist, int i)
 
struct int_nodeintlist__findnew (struct intlist *ilist, int i)
 
static bool intlist__has_entry (struct intlist *ilist, int i)
 
static bool intlist__empty (const struct intlist *ilist)
 
static unsigned int intlist__nr_entries (const struct intlist *ilist)
 
static struct int_nodeintlist__first (struct intlist *ilist)
 
static struct int_nodeintlist__next (struct int_node *in)
 

Macro Definition Documentation

◆ intlist__for_each_entry

#define intlist__for_each_entry (   pos,
  ilist 
)    for (pos = intlist__first(ilist); pos; pos = intlist__next(pos))

intlist__for_each_entry - iterate over a intlist : the &struct int_node to use as a loop cursor. : the &struct intlist for loop.

Definition at line 65 of file intlist.h.

◆ intlist__for_each_entry_safe

#define intlist__for_each_entry_safe (   pos,
  n,
  ilist 
)
Value:
for (pos = intlist__first(ilist), n = intlist__next(pos); pos;\
pos = n, n = intlist__next(n))
static struct int_node * intlist__first(struct intlist *ilist)
Definition: intlist.h:46
static struct int_node * intlist__next(struct int_node *in)
Definition: intlist.h:51

intlist__for_each_entry_safe - iterate over a intlist safe against removal of int_node : the &struct int_node to use as a loop cursor.
: another &struct int_node to use as temporary storage. : the &struct intlist for loop.

Definition at line 75 of file intlist.h.

Function Documentation

◆ intlist__add()

int intlist__add ( struct intlist ilist,
int  i 
)

Definition at line 51 of file intlist.c.

Here is the call graph for this function:

◆ intlist__delete()

void intlist__delete ( struct intlist ilist)

Definition at line 130 of file intlist.c.

Here is the call graph for this function:

◆ intlist__empty()

static bool intlist__empty ( const struct intlist ilist)
inlinestatic

Definition at line 35 of file intlist.h.

Here is the call graph for this function:

◆ intlist__entry()

struct int_node* intlist__entry ( const struct intlist ilist,
unsigned int  idx 
)

Definition at line 136 of file intlist.c.

Here is the call graph for this function:

◆ intlist__find()

struct int_node* intlist__find ( struct intlist ilist,
int  i 
)

Definition at line 81 of file intlist.c.

Here is the call graph for this function:

◆ intlist__findnew()

struct int_node* intlist__findnew ( struct intlist ilist,
int  i 
)

Definition at line 86 of file intlist.c.

Here is the call graph for this function:

◆ intlist__first()

static struct int_node* intlist__first ( struct intlist ilist)
static

Definition at line 46 of file intlist.h.

◆ intlist__has_entry()

static bool intlist__has_entry ( struct intlist ilist,
int  i 
)
inlinestatic

Definition at line 30 of file intlist.h.

Here is the call graph for this function:

◆ intlist__new()

struct intlist* intlist__new ( const char *  slist)

Definition at line 110 of file intlist.c.

Here is the call graph for this function:

◆ intlist__next()

static struct int_node* intlist__next ( struct int_node in)
static

Definition at line 51 of file intlist.h.

◆ intlist__nr_entries()

static unsigned int intlist__nr_entries ( const struct intlist ilist)
inlinestatic

Definition at line 40 of file intlist.h.

Here is the call graph for this function:

◆ intlist__remove()

void intlist__remove ( struct intlist ilist,
struct int_node in 
)

Definition at line 56 of file intlist.c.

Here is the call graph for this function: