[dpdk-stable] patch 'examples/performance-thread: check thread creation' has been queued to LTS release 16.11.4
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Oct 30 16:35:09 CET 2017
Hi,
FYI, your patch has been queued to LTS release 16.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/01/17. So please
shout if anyone has objections.
Thanks.
Kind regards,
Luca Boccassi
---
>From c6d6f502a67367f47cd5dd9ab7fe0c10103c1747 Mon Sep 17 00:00:00 2001
From: Jacek Piasecki <jacekx.piasecki at intel.com>
Date: Thu, 12 Oct 2017 13:44:44 +0200
Subject: [PATCH] examples/performance-thread: check thread creation
[ upstream commit 842ee032e41e678568ffbce29172b346dc09c82b ]
There was a call for thread create function without result check.
Added result check and message printout after failure.
Coverity issue: 143441
Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")
Signed-off-by: Jacek Piasecki <jacekx.piasecki at intel.com>
Acked-by: Michal Jastrzebski <michalx.k.jastrzebski at intel.com>
---
examples/performance-thread/pthread_shim/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c
index 850b009d3..febae39be 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -161,6 +161,7 @@ static void initial_lthread(void *args __attribute__((unused)))
pthread_override_set(1);
uint64_t i;
+ int ret;
/* initialize mutex for shared counter */
print_count = 0;
@@ -187,7 +188,10 @@ static void initial_lthread(void *args __attribute__((unused)))
pthread_attr_setaffinity_np(&attr, sizeof(rte_cpuset_t), &cpuset);
/* create the thread */
- pthread_create(&tid[i], &attr, helloworld_pthread, (void *) i);
+ ret = pthread_create(&tid[i], &attr,
+ helloworld_pthread, (void *) i);
+ if (ret != 0)
+ rte_exit(EXIT_FAILURE, "Cannot create helloworld thread\n");
}
/* wait for 1s to allow threads
--
2.11.0
More information about the stable
mailing list