DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/performance-thread: fix build issue with clang 12.0.1
@ 2021-08-16 13:19 jerinj
  2021-08-19  7:09 ` Ali Alnubani
  0 siblings, 1 reply; 3+ messages in thread
From: jerinj @ 2021-08-16 13:19 UTC (permalink / raw)
  To: John McNamara, Ian Betts, Tomasz Kulasek
  Cc: dev, thomas, bruce.richardson, david.marchand, Jerin Jacob, alialnu

From: Jerin Jacob <jerinj@marvell.com>

In clang 12.0.1 version, the use of pthread_yield() deprecated,
use sched_yield() instead.

log:

Compiling C object
examples/dpdk-pthread_shim.p/performance-thread_pthread_shim_main.c.o
../examples/performance-thread/pthread_shim/main.c: In function
'helloworld_pthread':
../examples/performance-thread/pthread_shim/main.c:75:9: warning:
'pthread_yield' is deprecated: pthread_yield is deprecated, use
sched_yield instead [-Wdeprecated-declarations]

Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app")

Bugzilla ID: 745

Cc: alialnu@oss.nvidia.com

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 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.32.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-27 11:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 13:19 [dpdk-dev] [PATCH] examples/performance-thread: fix build issue with clang 12.0.1 jerinj
2021-08-19  7:09 ` Ali Alnubani
2021-08-27 11:36   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).