From eec17bcf6b113084bb734b2f2ad32550b2cd302a 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 [ upstream commit 5e184c4cc7ca5633aaebf15f73882b8456d13fd7 ] 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") 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 d137c49bb3..f169709137 100644 --- a/examples/performance-thread/pthread_shim/main.c +++ b/examples/performance-thread/pthread_shim/main.c @@ -71,7 +71,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);