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

Go to the source code of this file.

Data Structures

struct  m0_list_link
 
struct  m0_list
 

Macros

#define __MOTR_LIB_LIST_H__
 
#define m0_list_entry(link, type, member)   container_of(link, type, member)
 
#define m0_list_for_each(head, pos)
 
#define m0_list_for_each_entry(head, pos, type, member)
 
#define m0_list_for_each_entry_safe(head, pos, next, type, member)
 
#define m0_list_forall(var, head, ...)
 
#define m0_list_entry_forall(var, head, type, member, ...)
 
#define m0_list_teardown(head, pos, type, member)
 

Functions

struct m0_list_link M0_XCA_DOMAIN (be)
 
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_invariant (const struct m0_list_link *link)
 
 M0_BASSERT (offsetof(struct m0_list, l_head)==offsetof(struct m0_list_link, ll_next))
 
 M0_BASSERT (offsetof(struct m0_list, l_tail)==offsetof(struct m0_list_link, ll_prev))
 
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_contains (const struct m0_list *list, const struct m0_list_link *link)
 
M0_INTERNAL bool m0_list_invariant (const struct m0_list *list)
 
M0_INTERNAL size_t m0_list_length (const struct m0_list *list)
 
M0_INTERNAL void m0_list_add (struct m0_list *head, struct m0_list_link *next)
 
M0_INTERNAL void m0_list_add_tail (struct m0_list *head, struct m0_list_link *next)
 
M0_INTERNAL void m0_list_add_after (struct m0_list_link *anchor, struct m0_list_link *next)
 
M0_INTERNAL void m0_list_add_before (struct m0_list_link *anchor, struct m0_list_link *next)
 
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 *next)
 
M0_INTERNAL void m0_list_move_tail (struct m0_list *head, struct m0_list_link *next)
 
static struct m0_list_linkm0_list_first (const struct m0_list *head)
 
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)
 

Variables

struct m0_list_linkll_next
 
struct m0_list_linkll_prev
 
struct m0_list_linkl_head
 
struct m0_list_linkl_tail
 

Macro Definition Documentation

◆ __MOTR_LIB_LIST_H__

#define __MOTR_LIB_LIST_H__

Definition at line 26 of file list.h.

Variable Documentation

◆ l_head

struct m0_list_link* l_head

Pointer to the first entry in the list.

Definition at line 71 of file list.h.

◆ l_tail

struct m0_list_link* l_tail

Pointer to the last entry in the list.

Definition at line 75 of file list.h.

◆ ll_next

struct m0_list_link* ll_next

Next entry in the list

Definition at line 190 of file list.h.

◆ ll_prev

struct m0_list_link* ll_prev

Previous entry in the list

Definition at line 194 of file list.h.