eal: improve musl compatibility of thread log
Musl complains about pthread id being of wrong size, because on musl, pthread_t is a struct pointer, not an unsigned int. Fix the printing code by casting pthread id to unsigned pointer type and adjusting the format specifier to be of appropriate size. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
0601defe2e
commit
0042eb5646
@ -1008,8 +1008,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=%zx;cpuset=[%s%s])\n",
|
||||
rte_config.master_lcore, (uintptr_t)thread_id, cpuset,
|
||||
ret == 0 ? "" : "...");
|
||||
|
||||
RTE_LCORE_FOREACH_SLAVE(i) {
|
||||
|
@ -121,8 +121,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=%zx;cpuset=[%s%s])\n",
|
||||
lcore_id, (uintptr_t)thread_id, cpuset, ret == 0 ? "" : "...");
|
||||
|
||||
/* read on our pipe to get commands */
|
||||
while (1) {
|
||||
|
Loading…
Reference in New Issue
Block a user