DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: dpdk@stormmq.com
Subject: [dpdk-dev] [PATCH 7/7] eal: improve musl compatibility
Date: Wed, 29 Aug 2018 12:56:21 +0100	[thread overview]
Message-ID: <4f7ac27b4fe1561fd3e3358a89f89ce025a7a128.1535543250.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1535543250.git.anatoly.burakov@intel.com>
In-Reply-To: <cover.1535543250.git.anatoly.burakov@intel.com>

Musl complains about pthread id being of wrong size. Fix it by
casting to 64-bit and printing 64-bit hex unconditionally.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal.c        | 5 +++--
 lib/librte_eal/linuxapp/eal/eal_thread.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index e59ac6577..abd61d346 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -3,6 +3,7 @@
  * Copyright(c) 2012-2014 6WIND S.A.
  */
 
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -979,8 +980,8 @@ rte_eal_init(int argc, char **argv)
 
 	ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
 
-	RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%x;cpuset=[%s%s])\n",
-		rte_config.master_lcore, (int)thread_id, cpuset,
+	RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%" PRIx64" ;cpuset=[%s%s])\n",
+		rte_config.master_lcore, (uint64_t)thread_id, cpuset,
 		ret == 0 ? "" : "...");
 
 	RTE_LCORE_FOREACH_SLAVE(i) {
diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index b496fc711..c818375d9 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -3,6 +3,7 @@
  */
 
 #include <errno.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -121,8 +122,8 @@ eal_thread_loop(__attribute__((unused)) void *arg)
 
 	ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
 
-	RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%x;cpuset=[%s%s])\n",
-		lcore_id, (int)thread_id, cpuset, ret == 0 ? "" : "...");
+	RTE_LOG(DEBUG, EAL, "lcore %u is ready (tid=%" PRIx64 ";cpuset=[%s%s])\n",
+		lcore_id, (uint64_t)thread_id, cpuset, ret == 0 ? "" : "...");
 
 	/* read on our pipe to get commands */
 	while (1) {
-- 
2.17.1

  parent reply	other threads:[~2018-08-29 11:57 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 11:56 [dpdk-dev] [PATCH 0/7] Improve core EAL " Anatoly Burakov
2018-08-29 11:56 ` [dpdk-dev] [PATCH 1/7] linuxapp: build with _GNU_SOURCE defined by default Anatoly Burakov
2018-08-29 11:56 ` [dpdk-dev] [PATCH 2/7] pci/vfio: improve musl compatibility Anatoly Burakov
2018-08-29 12:35   ` Bruce Richardson
2018-08-29 14:08     ` Burakov, Anatoly
2018-08-29 11:56 ` [dpdk-dev] [PATCH 3/7] fbarray: " Anatoly Burakov
2018-08-29 11:56 ` [dpdk-dev] [PATCH 4/7] eal/hugepage_info: " Anatoly Burakov
2018-08-29 11:56 ` [dpdk-dev] [PATCH 5/7] mem: " Anatoly Burakov
2018-08-29 11:56 ` [dpdk-dev] [PATCH 6/7] string_fns: " Anatoly Burakov
2018-08-29 11:56 ` Anatoly Burakov [this message]
2018-08-29 12:39   ` [dpdk-dev] [PATCH 7/7] eal: " Bruce Richardson
2018-08-29 12:40     ` Bruce Richardson
2018-08-29 14:09     ` Burakov, Anatoly
2018-08-29 16:47       ` Stephen Hemminger
2018-08-30  9:13         ` Burakov, Anatoly
2018-08-29 16:43   ` Stephen Hemminger
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 0/7] Improve core EAL " Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 " Anatoly Burakov
2018-10-22  9:33     ` Thomas Monjalon
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 1/7] mk: build with _GNU_SOURCE defined by default Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 2/7] pci/vfio: improve musl compatibility Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 3/7] fbarray: " Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 4/7] eal/hugepage_info: " Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 5/7] mem: " Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 6/7] string_fns: " Anatoly Burakov
2018-10-04 10:20   ` [dpdk-dev] [PATCH v3 7/7] eal: " Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 1/7] linuxapp: build with _GNU_SOURCE defined by default Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 2/7] pci/vfio: improve musl compatibility Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 3/7] fbarray: " Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 4/7] eal/hugepage_info: " Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 5/7] mem: " Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 6/7] string_fns: " Anatoly Burakov
2018-09-20 15:27 ` [dpdk-dev] [PATCH v2 7/7] eal: " Anatoly Burakov
2018-09-28 15:25 ` [dpdk-dev] [PATCH 0/7] Improve core EAL " Bruce Richardson
2018-10-03 22:56   ` Thomas Monjalon
2018-10-04  9:15     ` Burakov, Anatoly

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=4f7ac27b4fe1561fd3e3358a89f89ce025a7a128.1535543250.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=dpdk@stormmq.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).