From 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Mon, 16 Aug 2021 18:49:14 +0530 Subject: [PATCH] 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 --- examples/performance-thread/pthread_shim/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1