[v2,5/7] examples/performance-thread: add pthread shim to meson

Message ID 20191015133513.11376-6-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series support all examples in a meson build |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail Compilation issues

Commit Message

Bruce Richardson Oct. 15, 2019, 1:35 p.m. UTC
  Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build                          |  1 +
 .../pthread_shim/meson.build                  | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 examples/performance-thread/pthread_shim/meson.build
  

Patch

diff --git a/examples/meson.build b/examples/meson.build
index 889bb6b2c..8ef81446f 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -32,6 +32,7 @@  all_examples = [
 	'multi_process/symmetric_mp',
 	'netmap_compat', 'ntb', 'packet_ordering',
 	'performance-thread/l3fwd-thread',
+	'performance-thread/pthread_shim',
 	'ptpclient',
 	'qos_meter', 'qos_sched',
 	'quota_watermark', 'rxtx_callbacks',
diff --git a/examples/performance-thread/pthread_shim/meson.build b/examples/performance-thread/pthread_shim/meson.build
new file mode 100644
index 000000000..393fbd122
--- /dev/null
+++ b/examples/performance-thread/pthread_shim/meson.build
@@ -0,0 +1,28 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+
+# meson file, for building this example as part of a main DPDK build.
+#
+# To build this example as a standalone application with an already-installed
+# DPDK instance, use 'make'
+
+build = dpdk_conf.has('RTE_ARCH_X86_64') or dpdk_conf.has('RTE_ARCH_ARM64')
+deps += ['timer']
+
+# get the performance thread (pt) architecture subdir
+if dpdk_conf.has('RTE_ARCH_ARM64')
+	pt_arch_dir = '../common/arch/arm64'
+else
+	pt_arch_dir = '../common/arch/x86'
+endif
+sources += files('main.c',
+	'pthread_shim.c',
+	'../common/lthread.c',
+	'../common/lthread_cond.c',
+	'../common/lthread_diag.c',
+	'../common/lthread_mutex.c',
+	'../common/lthread_sched.c',
+	'../common/lthread_tls.c',
+	pt_arch_dir + '/ctx.c')
+
+includes += include_directories('../common', pt_arch_dir)