summaryrefslogtreecommitdiff
path: root/libcr_ipc/_linkedlist.h
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-12 08:34:19 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-12 08:34:19 -0600
commitddd3f3982c6cdf8d7d0068e544cc9daf24355d32 (patch)
tree747821d810bf6ecb97089af088e3946cfc1225ce /libcr_ipc/_linkedlist.h
parentd053a0f6dffc575611324b81acaef0d1554bda6c (diff)
parente0d67aeb886c75dde8f05120a2d8d1bd2dd2c16c (diff)
Merge branch 'lukeshu/tidy'
Diffstat (limited to 'libcr_ipc/_linkedlist.h')
-rw-r--r--libcr_ipc/_linkedlist.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/libcr_ipc/_linkedlist.h b/libcr_ipc/_linkedlist.h
deleted file mode 100644
index ab6d89e..0000000
--- a/libcr_ipc/_linkedlist.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* libcr_ipc/_linkedlist.h - Common low-level linked lists for use in libcr_ipc
- *
- * Copyright (C) 2024-2025 Luke T. Shumaker <lukeshu@lukeshu.com>
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-#ifndef _LIBCR_IPC__LINKEDLIST_H_
-#define _LIBCR_IPC__LINKEDLIST_H_
-
-#include <libmisc/assert.h>
-
-#include <libcr_ipc/_linkedlist_pub.h>
-
-/* singly linked list *********************************************************/
-
-typedef struct _cr_ipc_sll_node {
- struct _cr_ipc_sll_node *rear;
-} cr_ipc_sll_node;
-
-#define cr_ipc_sll_node_cast(node_typ, node_ptr) \
- ({ \
- static_assert(_Generic(node_ptr, cr_ipc_sll_node *: 1, default: 0), \
- "typeof("#node_ptr") != cr_ipc_sll_node *"); \
- assert(node_ptr); \
- static_assert(offsetof(node_typ, cr_ipc_sll_node) == 0); \
- ((node_typ*)(node_ptr)); \
- })
-
-void cr_ipc_sll_push_to_rear(_cr_ipc_sll_root *root, cr_ipc_sll_node *node);
-void cr_ipc_sll_pop_from_front(_cr_ipc_sll_root *root);
-
-/* doubly linked list *********************************************************/
-
-typedef struct _cr_ipc_dll_node {
- struct _cr_ipc_dll_node *front, *rear;
-} cr_ipc_dll_node;
-
-#define cr_ipc_dll_node_cast(node_typ, node_ptr) \
- ({ \
- static_assert(_Generic(node_ptr, cr_ipc_dll_node *: 1, default: 0), \
- "typeof("#node_ptr") != cr_ipc_dll_node *"); \
- assert(node_ptr); \
- static_assert(offsetof(node_typ, cr_ipc_dll_node) == 0); \
- ((node_typ*)(node_ptr)); \
- })
-
-void cr_ipc_dll_push_to_rear(_cr_ipc_dll_root *root, cr_ipc_dll_node *node);
-void cr_ipc_dll_remove(_cr_ipc_dll_root *root, cr_ipc_dll_node *node);
-void cr_ipc_dll_pop_from_front(_cr_ipc_dll_root *root);
-
-#endif /* _LIBCR_IPC__LINKEDLIST_H_ */