Introduce list_types.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 18 Dec 2023 14:28:00 +0000 (09:28 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 18 Dec 2023 14:50:10 +0000 (09:50 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/list.h
src/list_types.h [new file with mode: 0644]

index f017e1a14bf2ef0a963606b4325757597f163e7e..fc9760594531ad22753ab96b86460dc4f9874ca1 100644 (file)
@@ -6,22 +6,7 @@
 #ifndef _SIDE_LIST_H
 #define _SIDE_LIST_H
 
-struct side_list_node {
-       struct side_list_node *next;
-       struct side_list_node *prev;
-};
-
-struct side_list_head {
-       struct side_list_node node;
-};
-
-#define DEFINE_SIDE_LIST_HEAD(_identifier) \
-       struct side_list_head _identifier = { \
-               .node = { \
-                       .next = &(_identifier).node, \
-                       .prev = &(_identifier).node, \
-               }, \
-       }
+#include "list_types.h"
 
 static inline
 void side_list_insert_node_tail(struct side_list_head *head, struct side_list_node *node)
diff --git a/src/list_types.h b/src/list_types.h
new file mode 100644 (file)
index 0000000..e725eff
--- /dev/null
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright 2022 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _SIDE_LIST_TYPES_H
+#define _SIDE_LIST_TYPES_H
+
+struct side_list_node {
+       struct side_list_node *next;
+       struct side_list_node *prev;
+};
+
+struct side_list_head {
+       struct side_list_node node;
+};
+
+#define DEFINE_SIDE_LIST_HEAD(_identifier) \
+       struct side_list_head _identifier = { \
+               .node = { \
+                       .next = &(_identifier).node, \
+                       .prev = &(_identifier).node, \
+               }, \
+       }
+
+#endif /* _SIDE_LIST_TYPES_H */
This page took 0.024552 seconds and 4 git commands to generate.