2014-12-15 14:10:38 +01:00
|
|
|
|
/*
|
2016-03-25 14:10:20 -07:00
|
|
|
|
* Copyright (c) 2008, 2009, 2010, 2011, 2013, 2015, 2016 Nicira, Inc.
|
2014-12-15 14:10:38 +01:00
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at:
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
#ifndef OPENVSWITCH_LIST_H
|
|
|
|
|
#define OPENVSWITCH_LIST_H 1
|
|
|
|
|
|
2016-03-25 14:10:20 -07:00
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
#include <openvswitch/types.h>
|
|
|
|
|
#include <openvswitch/util.h>
|
|
|
|
|
|
2017-07-30 18:03:24 -07:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-12-15 14:10:38 +01:00
|
|
|
|
/* Doubly linked list head or element. */
|
|
|
|
|
struct ovs_list {
|
|
|
|
|
struct ovs_list *prev; /* Previous list element. */
|
|
|
|
|
struct ovs_list *next; /* Next list element. */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define OVS_LIST_INITIALIZER(LIST) { LIST, LIST }
|
|
|
|
|
|
2016-03-25 14:10:20 -07:00
|
|
|
|
/* "struct ovs_list" with pointers that will (probably) cause segfaults if
|
|
|
|
|
* dereferenced and, better yet, show up clearly in a debugger.
|
|
|
|
|
|
|
|
|
|
* MSVC2015 doesn't support designated initializers when compiling C++,
|
|
|
|
|
* and doesn't support ternary operators with non-designated initializers.
|
|
|
|
|
* So we use these static definitions rather than using initializer macros. */
|
|
|
|
|
static const struct ovs_list OVS_LIST_POISON =
|
|
|
|
|
{ (struct ovs_list *) (UINTPTR_MAX / 0xf * 0xc),
|
|
|
|
|
(struct ovs_list *) (UINTPTR_MAX / 0xf * 0xc) };
|
|
|
|
|
|
2016-03-25 14:10:22 -07:00
|
|
|
|
static inline void ovs_list_init(struct ovs_list *);
|
|
|
|
|
static inline void ovs_list_poison(struct ovs_list *);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
/* List insertion. */
|
2016-03-25 14:10:22 -07:00
|
|
|
|
static inline void ovs_list_insert(struct ovs_list *, struct ovs_list *);
|
|
|
|
|
static inline void ovs_list_splice(struct ovs_list *before, struct ovs_list *first,
|
2016-03-25 14:10:20 -07:00
|
|
|
|
struct ovs_list *last);
|
2016-03-25 14:10:22 -07:00
|
|
|
|
static inline void ovs_list_push_front(struct ovs_list *, struct ovs_list *);
|
|
|
|
|
static inline void ovs_list_push_back(struct ovs_list *, struct ovs_list *);
|
|
|
|
|
static inline void ovs_list_replace(struct ovs_list *, const struct ovs_list *);
|
|
|
|
|
static inline void ovs_list_moved(struct ovs_list *, const struct ovs_list *orig);
|
|
|
|
|
static inline void ovs_list_move(struct ovs_list *dst, struct ovs_list *src);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
/* List removal. */
|
2016-03-25 14:10:22 -07:00
|
|
|
|
static inline struct ovs_list *ovs_list_remove(struct ovs_list *);
|
|
|
|
|
static inline struct ovs_list *ovs_list_pop_front(struct ovs_list *);
|
|
|
|
|
static inline struct ovs_list *ovs_list_pop_back(struct ovs_list *);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
/* List elements. */
|
2016-03-25 14:10:22 -07:00
|
|
|
|
static inline struct ovs_list *ovs_list_front(const struct ovs_list *);
|
|
|
|
|
static inline struct ovs_list *ovs_list_back(const struct ovs_list *);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
/* List properties. */
|
2016-03-25 14:10:22 -07:00
|
|
|
|
static inline size_t ovs_list_size(const struct ovs_list *);
|
|
|
|
|
static inline bool ovs_list_is_empty(const struct ovs_list *);
|
|
|
|
|
static inline bool ovs_list_is_singleton(const struct ovs_list *);
|
|
|
|
|
static inline bool ovs_list_is_short(const struct ovs_list *);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
2022-03-23 12:56:13 +01:00
|
|
|
|
#define LIST_FOR_EACH(VAR, MEMBER, LIST) \
|
|
|
|
|
for (INIT_MULTIVAR(VAR, MEMBER, (LIST)->next, struct ovs_list); \
|
|
|
|
|
CONDITION_MULTIVAR(VAR, MEMBER, ITER_VAR(VAR) != (LIST)); \
|
|
|
|
|
UPDATE_MULTIVAR(VAR, ITER_VAR(VAR)->next))
|
|
|
|
|
|
|
|
|
|
#define LIST_FOR_EACH_CONTINUE(VAR, MEMBER, LIST) \
|
|
|
|
|
for (INIT_MULTIVAR(VAR, MEMBER, VAR->MEMBER.next, struct ovs_list); \
|
|
|
|
|
CONDITION_MULTIVAR(VAR, MEMBER, ITER_VAR(VAR) != (LIST)); \
|
|
|
|
|
UPDATE_MULTIVAR(VAR, ITER_VAR(VAR)->next))
|
|
|
|
|
|
|
|
|
|
#define LIST_FOR_EACH_REVERSE(VAR, MEMBER, LIST) \
|
|
|
|
|
for (INIT_MULTIVAR(VAR, MEMBER, (LIST)->prev, struct ovs_list); \
|
|
|
|
|
CONDITION_MULTIVAR(VAR, MEMBER, ITER_VAR(VAR) != (LIST)); \
|
|
|
|
|
UPDATE_MULTIVAR(VAR, ITER_VAR(VAR)->prev))
|
|
|
|
|
|
|
|
|
|
#define LIST_FOR_EACH_REVERSE_CONTINUE(VAR, MEMBER, LIST) \
|
|
|
|
|
for (INIT_MULTIVAR(VAR, MEMBER, VAR->MEMBER.prev, struct ovs_list); \
|
|
|
|
|
CONDITION_MULTIVAR(VAR, MEMBER, ITER_VAR(VAR) != (LIST)); \
|
|
|
|
|
UPDATE_MULTIVAR(VAR, ITER_VAR(VAR)->prev))
|
|
|
|
|
|
2022-03-23 12:56:14 +01:00
|
|
|
|
/* LONG version of SAFE iterators. */
|
|
|
|
|
#define LIST_FOR_EACH_REVERSE_SAFE_LONG(VAR, PREV, MEMBER, LIST) \
|
2022-03-23 12:56:13 +01:00
|
|
|
|
for (INIT_MULTIVAR_SAFE_LONG(VAR, PREV, MEMBER, (LIST)->prev, \
|
|
|
|
|
struct ovs_list); \
|
|
|
|
|
CONDITION_MULTIVAR_SAFE_LONG(VAR, PREV, MEMBER, \
|
|
|
|
|
ITER_VAR(VAR) != (LIST), \
|
|
|
|
|
ITER_VAR(PREV) = ITER_VAR(VAR)->prev, \
|
|
|
|
|
ITER_VAR(PREV) != (LIST)); \
|
|
|
|
|
UPDATE_MULTIVAR_SAFE_LONG(VAR, PREV))
|
|
|
|
|
|
2022-03-23 12:56:14 +01:00
|
|
|
|
#define LIST_FOR_EACH_SAFE_LONG(VAR, NEXT, MEMBER, LIST) \
|
2022-03-23 12:56:13 +01:00
|
|
|
|
for (INIT_MULTIVAR_SAFE_LONG(VAR, NEXT, MEMBER, (LIST)->next, \
|
|
|
|
|
struct ovs_list); \
|
|
|
|
|
CONDITION_MULTIVAR_SAFE_LONG(VAR, NEXT, MEMBER, \
|
|
|
|
|
ITER_VAR(VAR) != (LIST), \
|
|
|
|
|
ITER_VAR(NEXT) = ITER_VAR(VAR)->next, \
|
|
|
|
|
ITER_VAR(NEXT) != (LIST)); \
|
|
|
|
|
UPDATE_MULTIVAR_SAFE_LONG(VAR, NEXT))
|
|
|
|
|
|
2022-03-23 12:56:14 +01:00
|
|
|
|
/* SHORT version of SAFE iterators. */
|
|
|
|
|
#define LIST_FOR_EACH_REVERSE_SAFE_SHORT(VAR, MEMBER, LIST) \
|
|
|
|
|
for (INIT_MULTIVAR_SAFE_SHORT(VAR, MEMBER, (LIST)->prev, struct ovs_list);\
|
|
|
|
|
CONDITION_MULTIVAR_SAFE_SHORT(VAR, MEMBER, \
|
|
|
|
|
ITER_VAR(VAR) != (LIST), \
|
|
|
|
|
ITER_NEXT_VAR(VAR) = ITER_VAR(VAR)->prev); \
|
|
|
|
|
UPDATE_MULTIVAR_SAFE_SHORT(VAR))
|
|
|
|
|
|
|
|
|
|
#define LIST_FOR_EACH_SAFE_SHORT(VAR, MEMBER, LIST) \
|
|
|
|
|
for (INIT_MULTIVAR_SAFE_SHORT(VAR, MEMBER, (LIST)->next, struct ovs_list);\
|
|
|
|
|
CONDITION_MULTIVAR_SAFE_SHORT(VAR, MEMBER, \
|
|
|
|
|
ITER_VAR(VAR) != (LIST), \
|
|
|
|
|
ITER_NEXT_VAR(VAR) = ITER_VAR(VAR)->next); \
|
|
|
|
|
UPDATE_MULTIVAR_SAFE_SHORT(VAR))
|
|
|
|
|
|
|
|
|
|
#define LIST_FOR_EACH_SAFE(...) \
|
|
|
|
|
OVERLOAD_SAFE_MACRO(LIST_FOR_EACH_SAFE_LONG, \
|
|
|
|
|
LIST_FOR_EACH_SAFE_SHORT, \
|
|
|
|
|
4, __VA_ARGS__)
|
|
|
|
|
|
|
|
|
|
#define LIST_FOR_EACH_REVERSE_SAFE(...) \
|
|
|
|
|
OVERLOAD_SAFE_MACRO(LIST_FOR_EACH_REVERSE_SAFE_LONG, \
|
|
|
|
|
LIST_FOR_EACH_REVERSE_SAFE_SHORT, \
|
|
|
|
|
4, __VA_ARGS__)
|
|
|
|
|
|
2022-03-23 12:56:13 +01:00
|
|
|
|
#define LIST_FOR_EACH_POP(ITER, MEMBER, LIST) \
|
|
|
|
|
while (!ovs_list_is_empty(LIST) ? \
|
|
|
|
|
(INIT_CONTAINER(ITER, ovs_list_pop_front(LIST), MEMBER), 1) : \
|
|
|
|
|
(ITER = NULL, 0))
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
/* Inline implementations. */
|
|
|
|
|
|
|
|
|
|
/* Initializes 'list' as an empty list. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_init(struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
list->next = list->prev = list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Initializes 'list' with pointers that will (probably) cause segfaults if
|
|
|
|
|
* dereferenced and, better yet, show up clearly in a debugger. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_poison(struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
*list = OVS_LIST_POISON;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Inserts 'elem' just before 'before'. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_insert(struct ovs_list *before, struct ovs_list *elem)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
elem->prev = before->prev;
|
|
|
|
|
elem->next = before;
|
|
|
|
|
before->prev->next = elem;
|
|
|
|
|
before->prev = elem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Removes elements 'first' though 'last' (exclusive) from their current list,
|
|
|
|
|
then inserts them just before 'before'. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_splice(struct ovs_list *before, struct ovs_list *first, struct ovs_list *last)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
if (first == last) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
last = last->prev;
|
|
|
|
|
|
|
|
|
|
/* Cleanly remove 'first'...'last' from its current list. */
|
|
|
|
|
first->prev->next = last->next;
|
|
|
|
|
last->next->prev = first->prev;
|
|
|
|
|
|
|
|
|
|
/* Splice 'first'...'last' into new list. */
|
|
|
|
|
first->prev = before->prev;
|
|
|
|
|
last->next = before;
|
|
|
|
|
before->prev->next = first;
|
|
|
|
|
before->prev = last;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Inserts 'elem' at the beginning of 'list', so that it becomes the front in
|
|
|
|
|
'list'. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_push_front(struct ovs_list *list, struct ovs_list *elem)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_insert(list->next, elem);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Inserts 'elem' at the end of 'list', so that it becomes the back in
|
|
|
|
|
* 'list'. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_push_back(struct ovs_list *list, struct ovs_list *elem)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_insert(list, elem);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Puts 'elem' in the position currently occupied by 'position'.
|
|
|
|
|
* Afterward, 'position' is not part of a list. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_replace(struct ovs_list *element, const struct ovs_list *position)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
element->next = position->next;
|
|
|
|
|
element->next->prev = element;
|
|
|
|
|
element->prev = position->prev;
|
|
|
|
|
element->prev->next = element;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Adjusts pointers around 'list' to compensate for 'list' having been moved
|
|
|
|
|
* around in memory (e.g. as a consequence of realloc()), with original
|
|
|
|
|
* location 'orig'.
|
|
|
|
|
*
|
|
|
|
|
* ('orig' likely points to freed memory, but this function does not
|
|
|
|
|
* dereference 'orig', it only compares it to 'list'. In a very pedantic
|
|
|
|
|
* language lawyer sense, this still yields undefined behavior, but it works
|
|
|
|
|
* with actual compilers.) */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_moved(struct ovs_list *list, const struct ovs_list *orig)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
if (list->next == orig) {
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_init(list);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
} else {
|
|
|
|
|
list->prev->next = list->next->prev = list;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Initializes 'dst' with the contents of 'src', compensating for moving it
|
|
|
|
|
* around in memory. The effect is that, if 'src' was the head of a list, now
|
|
|
|
|
* 'dst' is the head of a list containing the same elements. */
|
|
|
|
|
static inline void
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_move(struct ovs_list *dst, struct ovs_list *src)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
*dst = *src;
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_moved(dst, src);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Removes 'elem' from its list and returns the element that followed it.
|
|
|
|
|
Undefined behavior if 'elem' is not in a list. */
|
|
|
|
|
static inline struct ovs_list *
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_remove(struct ovs_list *elem)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
elem->prev->next = elem->next;
|
|
|
|
|
elem->next->prev = elem->prev;
|
|
|
|
|
return elem->next;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Removes the front element from 'list' and returns it. Undefined behavior if
|
|
|
|
|
'list' is empty before removal. */
|
|
|
|
|
static inline struct ovs_list *
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_pop_front(struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
struct ovs_list *front = list->next;
|
|
|
|
|
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_remove(front);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
return front;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Removes the back element from 'list' and returns it.
|
|
|
|
|
Undefined behavior if 'list' is empty before removal. */
|
|
|
|
|
static inline struct ovs_list *
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_pop_back(struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
struct ovs_list *back = list->prev;
|
|
|
|
|
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_remove(back);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
return back;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns the front element in 'list_'.
|
|
|
|
|
Undefined behavior if 'list_' is empty. */
|
|
|
|
|
static inline struct ovs_list *
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_front(const struct ovs_list *list_)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
struct ovs_list *list = CONST_CAST(struct ovs_list *, list_);
|
|
|
|
|
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_assert(!ovs_list_is_empty(list));
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
return list->next;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns the back element in 'list_'.
|
|
|
|
|
Undefined behavior if 'list_' is empty. */
|
|
|
|
|
static inline struct ovs_list *
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_back(const struct ovs_list *list_)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
struct ovs_list *list = CONST_CAST(struct ovs_list *, list_);
|
|
|
|
|
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_assert(!ovs_list_is_empty(list));
|
2016-03-25 14:10:20 -07:00
|
|
|
|
|
|
|
|
|
return list->prev;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns the number of elements in 'list'.
|
|
|
|
|
Runs in O(n) in the number of elements. */
|
|
|
|
|
static inline size_t
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_size(const struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
const struct ovs_list *e;
|
|
|
|
|
size_t cnt = 0;
|
|
|
|
|
|
|
|
|
|
for (e = list->next; e != list; e = e->next) {
|
|
|
|
|
cnt++;
|
|
|
|
|
}
|
|
|
|
|
return cnt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns true if 'list' is empty, false otherwise. */
|
|
|
|
|
static inline bool
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_is_empty(const struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
return list->next == list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns true if 'list' has exactly 1 element, false otherwise. */
|
|
|
|
|
static inline bool
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_is_singleton(const struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
2016-03-25 14:10:22 -07:00
|
|
|
|
return ovs_list_is_short(list) && !ovs_list_is_empty(list);
|
2016-03-25 14:10:20 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Returns true if 'list' has 0 or 1 elements, false otherwise. */
|
|
|
|
|
static inline bool
|
2016-03-25 14:10:22 -07:00
|
|
|
|
ovs_list_is_short(const struct ovs_list *list)
|
2016-03-25 14:10:20 -07:00
|
|
|
|
{
|
|
|
|
|
return list->next == list->prev;
|
|
|
|
|
}
|
|
|
|
|
|
2016-07-13 17:28:51 +00:00
|
|
|
|
/* Transplant a list into another, and resets the origin list */
|
|
|
|
|
static inline void
|
|
|
|
|
ovs_list_push_back_all(struct ovs_list *dst, struct ovs_list *src)
|
|
|
|
|
{
|
|
|
|
|
ovs_list_splice(dst, src->next, src);
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-30 18:03:24 -07:00
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-12-15 14:10:38 +01:00
|
|
|
|
#endif /* list.h */
|