From dfef28de887eba43747bca52584f8310450e243a Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Mon, 11 May 2015 14:13:47 +0200 Subject: llist: Add a C++ wrapper for linux_list This commit adds the LListHead class which is a wrapper around the linuxlist. It adds an additional member to refer to the container, since the container_of macro doesn't work properly with C++ classes. All functions and macros from linuxlist.h are support except for the entry macros (e.g. llist_entry, llist_for_each_entry, ...). To access the container (entry), an entry() method is provided instead: llist_for_each(pos, &elems) { pos->entry()->do_something(); } Sponsored-by: On-Waves ehf --- src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 8a422f64..0398028c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,7 +95,8 @@ noinst_HEADERS = \ rlc.h \ decoding.h \ llc.h \ - pcu_utils.h + pcu_utils.h \ + cxx_linuxlist.h osmo_pcu_SOURCES = pcu_main.cpp -- cgit v1.2.3