Hi,
On 30/05/16 02:46, Bill Fischofer wrote:
diff --git a/configure.ac <http://configure.ac> b/configure.ac
<http://configure.ac>
index 99772a1..199a6e2 100644
--- a/configure.ac <http://configure.ac>
+++ b/configure.ac <http://configure.ac>
@@ -141,6 +141,13 @@ AM_CONDITIONAL([test_helper], [test
x$test_helper = xyes ])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
+if test x$enable_shared != xyes;
+then
+ INLINES="INLINES"
+else
+ INLINES="__NOTHING"
+fi
+AC_SUBST(INLINES)
##########################################################################
# Setup doxygen documentation
diff --git a/platform/linux-dpdk/Makefile.am
b/platform/linux-dpdk/Makefile.am
index eadaf63..49ad877 100644
--- a/platform/linux-dpdk/Makefile.am
+++ b/platform/linux-dpdk/Makefile.am
@@ -47,8 +47,10 @@ odpapiinclude_HEADERS = \
$(srcdir)/include/odp/api/hash.h \
$(srcdir)/include/odp/api/hints.h \
$(srcdir)/include/odp/api/init.h \
+ $(srcdir)/include/odp/api/inlines.h \
$(srcdir)/include/odp/api/packet_flags.h \
$(srcdir)/include/odp/api/packet.h \
+ $(srcdir)/include/odp/api/packet_inlines.h \
$(srcdir)/include/odp/api/packet_io.h \
$(srcdir)/include/odp/api/pool.h \
$(srcdir)/include/odp/api/queue.h \
diff --git a/platform/linux-dpdk/include/odp/api/inlines.h.in
<http://inlines.h.in>
b/platform/linux-dpdk/include/odp/api/inlines.h.in
<http://inlines.h.in>
new file mode 100644
index 0000000..1e8bac8
--- /dev/null
+++ b/platform/linux-dpdk/include/odp/api/inlines.h.in
<http://inlines.h.in>
@@ -0,0 +1,27 @@
+/* Copyright (c) 2016, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP packet inline functions
+ */
I just noticed, this comment is also wrong.
+
+#ifndef ODP_PLAT_INLINES_H_
+#define ODP_PLAT_INLINES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define @INLINES@
Why the @ symbols here? Also, as an ODP configuration option,
shouldn't this be something like ODP_INLINES to avoid potential name
space issues?
AC_SUBST(INLINES) should replace @INLINES@ to the value determined in
the configure script. That's why platform/linux-dpdk/m4/configure.m4
includes this header file as well.
Yes, we can prepend it with "ODP_", but I would add an underscore to the
beginning, because this supposed to be an internal configuration
variable, applications are not supposed to use it directly. But they
include the generated inlines.h, so when they get to packet_inlines.h,
they'll know whether they should inline the functions or not.
Regards,
Zoli
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp