examples/performance-thread: fix return type of threads
authorDavid Hunt <david.hunt@intel.com>
Mon, 14 May 2018 02:53:15 +0000 (03:53 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 14 May 2018 10:20:14 +0000 (12:20 +0200)
commit803ee2ebd32d019d54011f185819f3b76b113c4f
tree90bd2aad99a03d5140fdabed98446074591dc14c
parenta68bc62fd10c80d5c5e11bfb18b098fda0436b32
examples/performance-thread: fix return type of threads

The function pthread_create() expects void *(*func) (void *)
for function pointer, however, lthread_func_t was defined as
void (*func) (void *), so now gcc 8.1 warns that the cast is
incorrect, causing a compilation failure. This patch changes
the declaration of lthread_func_t from returning a void to
returning a void*, and then changes the sample app in the
relevant places that are affected by the typedef change.

Fixes: 116819b9ed0d ("examples/performance-thread: add lthread subsystem")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
examples/performance-thread/common/lthread.c
examples/performance-thread/common/lthread_api.h
examples/performance-thread/l3fwd-thread/main.c
examples/performance-thread/pthread_shim/main.c
examples/performance-thread/pthread_shim/pthread_shim.c