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

Go to the source code of this file.

Classes

struct  str_node
 
struct  strlist
 
struct  strlist_config
 

Macros

#define strlist__for_each_entry(pos, slist)   for (pos = strlist__first(slist); pos; pos = strlist__next(pos))
 
#define strlist__for_each_entry_safe(pos, n, slist)
 

Functions

struct strliststrlist__new (const char *slist, const struct strlist_config *config)
 
void strlist__delete (struct strlist *slist)
 
void strlist__remove (struct strlist *slist, struct str_node *sn)
 
int strlist__load (struct strlist *slist, const char *filename)
 
int strlist__add (struct strlist *slist, const char *str)
 
struct str_nodestrlist__entry (const struct strlist *slist, unsigned int idx)
 
struct str_nodestrlist__find (struct strlist *slist, const char *entry)
 
static bool strlist__has_entry (struct strlist *slist, const char *entry)
 
static bool strlist__empty (const struct strlist *slist)
 
static unsigned int strlist__nr_entries (const struct strlist *slist)
 
static struct str_nodestrlist__first (struct strlist *slist)
 
static struct str_nodestrlist__next (struct str_node *sn)
 

Macro Definition Documentation

◆ strlist__for_each_entry

#define strlist__for_each_entry (   pos,
  slist 
)    for (pos = strlist__first(slist); pos; pos = strlist__next(pos))

strlist_for_each - iterate over a strlist : the &struct str_node to use as a loop cursor. : the &struct strlist for loop.

Definition at line 77 of file strlist.h.

◆ strlist__for_each_entry_safe

#define strlist__for_each_entry_safe (   pos,
  n,
  slist 
)
Value:
for (pos = strlist__first(slist), n = strlist__next(pos); pos;\
pos = n, n = strlist__next(n))
static struct str_node * strlist__first(struct strlist *slist)
Definition: strlist.h:58
static struct str_node * strlist__next(struct str_node *sn)
Definition: strlist.h:63

strlist_for_each_safe - iterate over a strlist safe against removal of str_node : the &struct str_node to use as a loop cursor.
: another &struct str_node to use as temporary storage. : the &struct strlist for loop.

Definition at line 87 of file strlist.h.

Function Documentation

◆ strlist__add()

int strlist__add ( struct strlist slist,
const char *  str 
)

Definition at line 64 of file strlist.c.

Here is the call graph for this function:

◆ strlist__delete()

void strlist__delete ( struct strlist slist)

Definition at line 193 of file strlist.c.

Here is the call graph for this function:

◆ strlist__empty()

static bool strlist__empty ( const struct strlist slist)
inlinestatic

Definition at line 47 of file strlist.h.

Here is the call graph for this function:

◆ strlist__entry()

struct str_node* strlist__entry ( const struct strlist slist,
unsigned int  idx 
)

Definition at line 199 of file strlist.c.

Here is the call graph for this function:

◆ strlist__find()

struct str_node* strlist__find ( struct strlist slist,
const char *  entry 
)

Definition at line 101 of file strlist.c.

Here is the call graph for this function:

◆ strlist__first()

static struct str_node* strlist__first ( struct strlist slist)
static

Definition at line 58 of file strlist.h.

◆ strlist__has_entry()

static bool strlist__has_entry ( struct strlist slist,
const char *  entry 
)
inlinestatic

Definition at line 42 of file strlist.h.

Here is the call graph for this function:

◆ strlist__load()

int strlist__load ( struct strlist slist,
const char *  filename 
)

Definition at line 69 of file strlist.c.

Here is the call graph for this function:

◆ strlist__new()

struct strlist* strlist__new ( const char *  slist,
const struct strlist_config config 
)

Definition at line 160 of file strlist.c.

Here is the call graph for this function:

◆ strlist__next()

static struct str_node* strlist__next ( struct str_node sn)
static

Definition at line 63 of file strlist.h.

◆ strlist__nr_entries()

static unsigned int strlist__nr_entries ( const struct strlist slist)
inlinestatic

Definition at line 52 of file strlist.h.

Here is the call graph for this function:

◆ strlist__remove()

void strlist__remove ( struct strlist slist,
struct str_node sn 
)

Definition at line 96 of file strlist.c.

Here is the call graph for this function: