Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Kopp
Ardix
Commits
b4046795
Verified
Commit
b4046795
authored
Aug 05, 2021
by
Felix Kopp
Browse files
list: fix shit
parent
c24b183c
Changes
1
Show whitespace changes
Inline
Side-by-side
include/ardix/list.h
View file @
b4046795
...
...
@@ -3,6 +3,8 @@
#pragma once
#include <ardix/util.h>
#include <stddef.h>
#include <toolchain.h>
struct
list_head
{
...
...
@@ -50,7 +52,7 @@ __always_inline void list_init(struct list_head *head)
cursor = (cursor)->prev)
#define list_for_each_safe(head, cursor, tmp) \
for (cursor = (head)->next, tmp = cursor; \
for (cursor = (head)->next, tmp =
(
cursor
)->next
; \
tmp != (head); \
tmp = (tmp)->next, cursor = tmp)
...
...
@@ -67,7 +69,7 @@ __always_inline void list_init(struct list_head *head)
#define list_for_each_entry_safe(head, cursor, tmp, member) \
for (cursor = list_first_entry(head, typeof(*(cursor)), member), \
tmp = list_next_entry(cursor, member); \
&
(tmp)->member != (head);
\
(tmp)->member
.prev
!= (head); \
cursor = tmp, tmp = list_next_entry(tmp, member))
void
list_insert
(
struct
list_head
*
head
,
struct
list_head
*
new
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment