From: Jerin Jacob Date: Mon, 16 Aug 2021 13:19:14 +0000 (+0530) Subject: examples/performance-thread: fix build with clang 12.0.1 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5e184c4cc7ca5633aaebf15f73882b8456d13fd7;p=dpdk.git examples/performance-thread: fix build with clang 12.0.1 In clang 12.0.1 version, the use of pthread_yield() is deprecated, use sched_yield() instead. log: examples/performance-thread/pthread_shim/main.c:75:9: warning: 'pthread_yield' is deprecated: pthread_yield is deprecated, use sched_yield instead [-Wdeprecated-declarations] Bugzilla ID: 745 Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app") Cc: stable@dpdk.org Signed-off-by: Jerin Jacob Tested-by: Ali Alnubani --- diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c index 257de50692..7ce6cfb0c8 100644 --- a/examples/performance-thread/pthread_shim/main.c +++ b/examples/performance-thread/pthread_shim/main.c @@ -72,7 +72,7 @@ void *helloworld_pthread(void *arg) print_count++; /* yield thread to give opportunity for lock contention */ - pthread_yield(); + sched_yield(); /* retrieve arg from TLS */ uint64_t thread_no = (uint64_t) pthread_getspecific(key);