From: <jerinj@marvell.com>
To: John McNamara <john.mcnamara@intel.com>,
Ian Betts <ian.betts@intel.com>,
Tomasz Kulasek <tomaszx.kulasek@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>,
<bruce.richardson@intel.com>, <david.marchand@redhat.com>,
Jerin Jacob <jerinj@marvell.com>, <alialnu@oss.nvidia.com>
Subject: [dpdk-dev] [PATCH] examples/performance-thread: fix build issue with clang 12.0.1
Date: Mon, 16 Aug 2021 18:49:14 +0530 [thread overview]
Message-ID: <20210816131914.544110-1-jerinj@marvell.com> (raw)
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
next reply other threads:[~2021-08-16 13:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-16 13:19 jerinj [this message]
2021-08-19 7:09 ` Ali Alnubani
2021-08-27 11:36 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210816131914.544110-1-jerinj@marvell.com \
--to=jerinj@marvell.com \
--cc=alialnu@oss.nvidia.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ian.betts@intel.com \
--cc=john.mcnamara@intel.com \
--cc=thomas@monjalon.net \
--cc=tomaszx.kulasek@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).