MOS Source Code
Loading...
Searching...
No Matches
tree.h File Reference
+ Include dependency graph for tree.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tree_node_t
 
struct  tree_op_t
 

Macros

#define as_tree   tree_node_t tree_node
 Embed a tree node into a struct.
 
#define tree_entry(node, type)
 
#define tree_node(element)
 
#define tree_parent(node, type)
 
#define tree_children_list(node)
 
#define tree_child_entry(node, type)
 
#define tree_child_node(node)
 
#define tree_foreach_child(t, v, h)
 

Typedefs

typedef struct tree_node tree_node_t
 

Functions

MOSAPI void tree_node_init (tree_node_t *node)
 
MOSAPI void tree_add_child (tree_node_t *parent, tree_node_t *child)
 

Macro Definition Documentation

◆ as_tree

#define as_tree   tree_node_t tree_node

Embed a tree node into a struct.

Definition at line 21 of file tree.h.

◆ tree_entry

#define tree_entry ( node,
type )
Value:
container_of((node), type, tree_node)
#define container_of(ptr, type, member)
Definition mos_global.h:50
#define tree_node(element)
Definition tree.h:29

Definition at line 28 of file tree.h.

◆ tree_node

#define tree_node ( element)
Value:
(&((element)->tree_node))

Definition at line 29 of file tree.h.

Referenced by dentry_create(), dentry_mount(), dentry_try_release(), and overlay_update_local_node_references().

◆ tree_parent

#define tree_parent ( node,
type )
Value:
(tree_entry(tree_node(node)->parent, type))
#define tree_entry(node, type)
Definition tree.h:28

Definition at line 30 of file tree.h.

Referenced by dentry_parent().

◆ tree_children_list

#define tree_children_list ( node)
Value:
(&((node)->tree_node.children))

Definition at line 32 of file tree.h.

◆ tree_child_entry

#define tree_child_entry ( node,
type )
Value:
container_of((node), type, tree_node.list_node)

Definition at line 33 of file tree.h.

◆ tree_child_node

#define tree_child_node ( node)
Value:
(&((node)->tree_node.list_node))

Definition at line 34 of file tree.h.

◆ tree_foreach_child

#define tree_foreach_child ( t,
v,
h )
Value:
#define tree_child_entry(node, type)
Definition tree.h:33
#define tree_child_node(node)
Definition tree.h:34
#define tree_children_list(node)
Definition tree.h:32

Definition at line 36 of file tree.h.

Referenced by dentry_check_refstat(), dentry_dump_refstat(), dentry_get_from_parent(), dentry_root_get_mountpoint(), and vfs_generic_iterate_dir().

Typedef Documentation

◆ tree_node_t

typedef struct tree_node tree_node_t

Definition at line 9 of file tree.h.

Function Documentation

◆ tree_node_init()

MOSAPI void tree_node_init ( tree_node_t * node)

Definition at line 8 of file tree.c.

Referenced by dentry_create().

+ Here is the call graph for this function:

◆ tree_add_child()

MOSAPI void tree_add_child ( tree_node_t * parent,
tree_node_t * child )

Definition at line 14 of file tree.c.

Referenced by dentry_create().

+ Here is the call graph for this function: