Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
llist.h File Reference
#include <type.h>

Go to the source code of this file.

Data Structures

struct  llist_head
 

Macros

#define LLIST_INIT(n)
 
#define LIST_HEAD(n)
 
#define list_entry(ptr, type, member)
 
#define list_for_each_entry(pos, head, member)
 

Functions

static void llist_init (struct llist_head *head)
 
static void llist_add (struct llist_head *new_, struct llist_head *next, struct llist_head *prev)
 
static void llist_add_tail (struct llist_head *new_, struct llist_head *head)
 
static void llist_del_init (struct llist_head *prev, struct llist_head *next)
 
static void llist_del (struct llist_head *entry)
 

Macro Definition Documentation

◆ list_entry

#define list_entry ( ptr,
type,
member )
Value:
#define container_of(ptr, type, member)
Definition type.h:108
uint8_t type
Definition vnode.h:2
uint64_t ptr
Definition xhci.hpp:0

Definition at line 48 of file llist.h.

◆ list_for_each_entry

#define list_for_each_entry ( pos,
head,
member )
Value:
for (pos = list_entry((head)->next, typeof(*pos), member); \
&pos->member != (head); \
pos = list_entry(pos->member.next, typeof(*pos), member))
struct cdev * next
Definition dev.h:4
uint64_t pos
Definition fd.h:4
#define list_entry(ptr, type, member)
Definition llist.h:48
uint32_t head
Definition tty.h:10

Definition at line 50 of file llist.h.

◆ LIST_HEAD

#define LIST_HEAD ( n)
Value:
struct llist_head n = LLIST_INIT(n)
#define LLIST_INIT(n)
Definition llist.h:15

Definition at line 16 of file llist.h.

◆ LLIST_INIT

#define LLIST_INIT ( n)
Value:
= {&(n), &(n)}

Definition at line 15 of file llist.h.

Function Documentation

◆ llist_add()

static void llist_add ( struct llist_head * new_,
struct llist_head * next,
struct llist_head * prev )
inlinestatic

Definition at line 23 of file llist.h.

References llist_head::next, next, llist_head::prev, and prev.

Referenced by llist_add_tail().

◆ llist_add_tail()

static void llist_add_tail ( struct llist_head * new_,
struct llist_head * head )
inlinestatic

Definition at line 32 of file llist.h.

References head, and llist_add().

Referenced by __attribute__().

◆ llist_del()

static void llist_del ( struct llist_head * entry)
inlinestatic

Definition at line 42 of file llist.h.

References llist_del_init(), llist_head::next, NULL, and llist_head::prev.

Referenced by vfs_umount_recursive().

◆ llist_del_init()

static void llist_del_init ( struct llist_head * prev,
struct llist_head * next )
inlinestatic

Definition at line 37 of file llist.h.

References next, and prev.

Referenced by llist_del().

◆ llist_init()

static void llist_init ( struct llist_head * head)
inlinestatic

Definition at line 18 of file llist.h.

References head.

Referenced by __attribute__().