Motr  M0
list.c File Reference
#include "lib/trace.h"
#include "lib/assert.h"
#include "lib/list.h"
Include dependency graph for list.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 

Functions

M0_INTERNAL void m0_list_init (struct m0_list *head)
 
M0_INTERNAL void m0_list_fini (struct m0_list *head)
 
M0_INTERNAL bool m0_list_is_empty (const struct m0_list *head)
 
M0_INTERNAL bool m0_list_link_invariant (const struct m0_list_link *link)
 
M0_INTERNAL bool m0_list_invariant (const struct m0_list *head)
 
M0_INTERNAL size_t m0_list_length (const struct m0_list *list)
 
M0_INTERNAL bool m0_list_contains (const struct m0_list *list, const struct m0_list_link *link)
 
static void __m0_list_add (struct m0_list_link *prev, struct m0_list_link *next, struct m0_list_link *new)
 
M0_INTERNAL void m0_list_add (struct m0_list *head, struct m0_list_link *new)
 
M0_INTERNAL void m0_list_add_tail (struct m0_list *head, struct m0_list_link *new)
 
M0_INTERNAL void m0_list_add_after (struct m0_list_link *anchor, struct m0_list_link *new)
 
M0_INTERNAL void m0_list_add_before (struct m0_list_link *anchor, struct m0_list_link *new)
 
static void __m0_list_del (struct m0_list_link *old)
 
M0_INTERNAL void m0_list_del (struct m0_list_link *old)
 
M0_INTERNAL void m0_list_move (struct m0_list *head, struct m0_list_link *old)
 
M0_INTERNAL void m0_list_move_tail (struct m0_list *head, struct m0_list_link *old)
 
M0_INTERNAL void m0_list_link_init (struct m0_list_link *link)
 
M0_INTERNAL void m0_list_link_fini (struct m0_list_link *link)
 
M0_INTERNAL bool m0_list_link_is_in (const struct m0_list_link *link)
 
M0_INTERNAL bool m0_list_link_is_last (const struct m0_list_link *link, const struct m0_list *head)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB

Definition at line 22 of file list.c.

Function Documentation

◆ __m0_list_add()

static void __m0_list_add ( struct m0_list_link prev,
struct m0_list_link next,
struct m0_list_link new 
)
inlinestatic

Definition at line 99 of file list.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ __m0_list_del()

static void __m0_list_del ( struct m0_list_link old)
static

Definition at line 140 of file list.c.

Here is the call graph for this function:
Here is the caller graph for this function: