aboutsummaryrefslogtreecommitdiff
path: root/helper/include/odph_list_internal.h
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2024-06-05 13:51:39 +0300
committerGitHub <noreply@github.com>2024-06-05 13:51:39 +0300
commit616034b9c9c789923f7ebe7f1c6d014c4ce8a5d2 (patch)
treedd1b579c93404d2d98b78944bbdf8313ec499bee /helper/include/odph_list_internal.h
parent8063101c4fac56e16c5a2bb9843f2fd9c5acbfd7 (diff)
parent87913e636da621d47a8d3bc91fbe131abc09c294 (diff)
Merge ODP linux-generic v1.45.0.0 into linux-dpdk.
Diffstat (limited to 'helper/include/odph_list_internal.h')
-rw-r--r--helper/include/odph_list_internal.h88
1 files changed, 0 insertions, 88 deletions
diff --git a/helper/include/odph_list_internal.h b/helper/include/odph_list_internal.h
deleted file mode 100644
index d90b07ebc..000000000
--- a/helper/include/odph_list_internal.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright (c) 2015-2018 Linaro Limited
- */
-
-/**
- * @file
- *
- * ODP list
- * a simple implementation of Doubly linked list
- */
-
-#ifndef ODPH_LIST_INTER_H_
-#define ODPH_LIST_INTER_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @cond _ODP_HIDE_FROM_DOXYGEN_ */
-
-typedef struct odph_list_object {
- struct odph_list_object *next;
-
- struct odph_list_object *prev;
-} odph_list_object;
-
-typedef odph_list_object odph_list_head;
-
-static inline void ODPH_INIT_LIST_HEAD(odph_list_object *list)
-{
- list->next = list;
- list->prev = list;
-}
-
-static inline void __odph_list_add(odph_list_object *new,
- odph_list_object *prev,
- odph_list_object *next)
-{
- next->prev = new;
- new->next = next;
- new->prev = prev;
- prev->next = new;
-}
-
-static inline void odph_list_add(odph_list_object *new, odph_list_object *head)
-{
- __odph_list_add(new, head, head->next);
-}
-
-static inline void odph_list_add_tail(struct odph_list_object *new,
- odph_list_object *head)
-{
- __odph_list_add(new, head->prev, head);
-}
-
-static inline void __odph_list_del(struct odph_list_object *prev,
- odph_list_object *next)
-{
- next->prev = prev;
- prev->next = next;
-}
-
-static inline void odph_list_del(struct odph_list_object *entry)
-{
- __odph_list_del(entry->prev, entry->next);
- ODPH_INIT_LIST_HEAD(entry);
-}
-
-static inline int odph_list_empty(const struct odph_list_object *head)
-{
- return head->next == head;
-}
-
-#define container_of(ptr, type, list_node) \
- ((type *)(void *)((char *)ptr - offsetof(type, list_node)))
-
-#define ODPH_LIST_FOR_EACH(pos, list_head, type, list_node) \
- for (pos = container_of((list_head)->next, type, list_node); \
- &pos->list_node != (list_head); \
- pos = container_of(pos->list_node.next, type, list_node))
-
-/** @endcond */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif