Expose the struct ovs_list definition in <openvswitch/list.h>. Keep the list access API private for now.
Signed-off-by: Thomas Graf <tg...@noironetworks.com> --- include/openvswitch/automake.mk | 1 + include/openvswitch/list.h | 27 +++++++++++++++++++++++++++ lib/list.h | 9 +-------- 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 include/openvswitch/list.h diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk index 7e225bb..0b95a0f 100644 --- a/include/openvswitch/automake.mk +++ b/include/openvswitch/automake.mk @@ -1,6 +1,7 @@ openvswitchincludedir = $(includedir)/openvswitch openvswitchinclude_HEADERS = \ include/openvswitch/compiler.h \ + include/openvswitch/list.h \ include/openvswitch/thread.h \ include/openvswitch/token-bucket.h \ include/openvswitch/types.h \ diff --git a/include/openvswitch/list.h b/include/openvswitch/list.h new file mode 100644 index 0000000..a5005ab --- /dev/null +++ b/include/openvswitch/list.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2008, 2009, 2010, 2011, 2013 Nicira, Inc. + * + * 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 + +/* Doubly linked list head or element. */ +struct ovs_list { + struct ovs_list *prev; /* Previous list element. */ + struct ovs_list *next; /* Next list element. */ +}; + +#define LIST_INITIALIZER(LIST) { LIST, LIST } + +#endif /* list.h */ diff --git a/lib/list.h b/lib/list.h index f2aa335..15be0f8 100644 --- a/lib/list.h +++ b/lib/list.h @@ -21,14 +21,7 @@ #include <stdbool.h> #include <stddef.h> #include "util.h" - -/* Doubly linked list head or element. */ -struct ovs_list { - struct ovs_list *prev; /* Previous list element. */ - struct ovs_list *next; /* Next list element. */ -}; - -#define LIST_INITIALIZER(LIST) { LIST, LIST } +#include "openvswitch/list.h" static inline void list_init(struct ovs_list *); static inline void list_poison(struct ovs_list *); -- 1.9.3 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev