From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Tyler Retzlaff <roretzla@linux.microsoft.com>,
David Marchand <david.marchand@redhat.com>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Chas Williams <chas3@att.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Matan Azrad <matan@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
Ajit Khaparde <ajit.khaparde@broadcom.com>,
Somnath Kotur <somnath.kotur@broadcom.com>,
Devendra Singh Rawat <dsinghrawat@marvell.com>,
Alok Prasad <palok@marvell.com>, Rosen Xu <rosen.xu@intel.com>,
Tianfei Zhang <tianfei.zhang@intel.com>,
Vijay Kumar Srivastava <vsrivast@xilinx.com>,
Jerin Jacob <jerinj@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Naga Harish K S V <s.v.naga.harish.k@intel.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Chenbo Xia <chenbo.xia@intel.com>
Subject: [PATCH 11/11] lib: remove pthread.h from includes
Date: Wed, 6 Sep 2023 18:12:28 +0200 [thread overview]
Message-ID: <20230906162226.1618088-12-thomas@monjalon.net> (raw)
In-Reply-To: <20230906162226.1618088-1-thomas@monjalon.net>
The header files should have the minimum embedded includes.
The file pthread.h can logically be removed from
rte_per_lcore.h and rte_ethdev_core.h files.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
app/test/test_link_bonding.c | 2 ++
drivers/common/mlx5/mlx5_common.c | 1 +
drivers/common/mlx5/windows/mlx5_win_ext.h | 2 ++
drivers/net/bnxt/bnxt.h | 1 +
drivers/net/qede/base/bcm_osal.h | 1 +
drivers/raw/ifpga/base/opae_osdep.h | 1 +
drivers/vdpa/sfc/sfc_vdpa.c | 1 +
lib/eal/common/eal_common_options.c | 1 +
lib/eal/common/eal_common_trace.c | 1 +
lib/eal/common/malloc_mp.c | 1 +
lib/eal/freebsd/eal_alarm.c | 1 +
lib/eal/include/rte_per_lcore.h | 2 --
lib/eal/linux/eal_alarm.c | 1 +
lib/ethdev/ethdev_driver.c | 1 +
lib/ethdev/ethdev_driver.h | 2 ++
lib/ethdev/rte_ethdev_core.h | 2 --
lib/ethdev/rte_flow.c | 1 +
lib/eventdev/rte_event_eth_rx_adapter.c | 1 +
lib/vhost/vhost.c | 1 +
19 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 2f46e4c6ee..d6b6ebc2f2 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -10,8 +10,10 @@
#include <stdint.h>
#include <inttypes.h>
#include <errno.h>
+#include <pthread.h>
#include <sys/queue.h>
#include <sys/time.h>
+
#include <rte_cycles.h>
#include <rte_byteorder.h>
#include <rte_common.h>
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 0ad14a48c7..ca8543e36e 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -5,6 +5,7 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+#include <pthread.h>
#include <rte_errno.h>
#include <rte_mempool.h>
diff --git a/drivers/common/mlx5/windows/mlx5_win_ext.h b/drivers/common/mlx5/windows/mlx5_win_ext.h
index 6f69329a6f..a71c69bff5 100644
--- a/drivers/common/mlx5/windows/mlx5_win_ext.h
+++ b/drivers/common/mlx5/windows/mlx5_win_ext.h
@@ -5,6 +5,8 @@
#ifndef __MLX5_WIN_ETX_H__
#define __MLX5_WIN_ETX_H__
+#include <pthread.h>
+
#include "mlx5_prm.h"
#include "mlx5devx.h"
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index ed21ba7f29..0e01b1d4ba 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -8,6 +8,7 @@
#include <inttypes.h>
#include <stdbool.h>
+#include <pthread.h>
#include <sys/queue.h>
#include <rte_pci.h>
diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index 97e261d306..11019b5623 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -8,6 +8,7 @@
#define __BCM_OSAL_H
#include <stdbool.h>
+#include <pthread.h>
#include <time.h>
#include <rte_bitops.h>
#include <rte_byteorder.h>
diff --git a/drivers/raw/ifpga/base/opae_osdep.h b/drivers/raw/ifpga/base/opae_osdep.h
index 033b7e098c..e91205f536 100644
--- a/drivers/raw/ifpga/base/opae_osdep.h
+++ b/drivers/raw/ifpga/base/opae_osdep.h
@@ -7,6 +7,7 @@
#include <string.h>
#include <stdbool.h>
+#include <pthread.h>
#ifdef RTE_LIB_EAL
#include "osdep_rte/osdep_generic.h"
diff --git a/drivers/vdpa/sfc/sfc_vdpa.c b/drivers/vdpa/sfc/sfc_vdpa.c
index bd6ecde450..9db87fcb7d 100644
--- a/drivers/vdpa/sfc/sfc_vdpa.c
+++ b/drivers/vdpa/sfc/sfc_vdpa.c
@@ -4,6 +4,7 @@
#include <stdbool.h>
#include <stdint.h>
+#include <pthread.h>
#include <sys/queue.h>
#include <rte_common.h>
diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
index d74b581567..a6d21f1cba 100644
--- a/lib/eal/common/eal_common_options.c
+++ b/lib/eal/common/eal_common_options.c
@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <string.h>
+#include <pthread.h>
#ifndef RTE_EXEC_ENV_WINDOWS
#include <syslog.h>
#endif
diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c
index cb980af06d..b21e61bf39 100644
--- a/lib/eal/common/eal_common_trace.c
+++ b/lib/eal/common/eal_common_trace.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <fnmatch.h>
+#include <pthread.h>
#include <sys/queue.h>
#include <regex.h>
diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
index 7270c2ec90..4d62397aba 100644
--- a/lib/eal/common/malloc_mp.c
+++ b/lib/eal/common/malloc_mp.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
+#include <pthread.h>
#include <sys/time.h>
#include <rte_errno.h>
diff --git a/lib/eal/freebsd/eal_alarm.c b/lib/eal/freebsd/eal_alarm.c
index acdcf53804..e5b0909a45 100644
--- a/lib/eal/freebsd/eal_alarm.c
+++ b/lib/eal/freebsd/eal_alarm.c
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <pthread.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/lib/eal/include/rte_per_lcore.h b/lib/eal/include/rte_per_lcore.h
index 2b846f9337..5a1497631a 100644
--- a/lib/eal/include/rte_per_lcore.h
+++ b/lib/eal/include/rte_per_lcore.h
@@ -22,8 +22,6 @@
extern "C" {
#endif
-#include <pthread.h>
-
#ifdef RTE_TOOLCHAIN_MSVC
/**
* Macro to define a per lcore variable "var" of type "type", don't
diff --git a/lib/eal/linux/eal_alarm.c b/lib/eal/linux/eal_alarm.c
index 397f25d7d5..766ba2c251 100644
--- a/lib/eal/linux/eal_alarm.c
+++ b/lib/eal/linux/eal_alarm.c
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
+#include <pthread.h>
#include <sys/queue.h>
#include <sys/time.h>
#include <sys/timerfd.h>
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index 0be1e8ca04..30db839a77 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -3,6 +3,7 @@
*/
#include <stdlib.h>
+#include <pthread.h>
#include <rte_kvargs.h>
#include <rte_malloc.h>
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index 980f837ab6..3fa8b309c1 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -18,6 +18,8 @@ extern "C" {
* use them.
*/
+#include <pthread.h>
+
#include <dev_driver.h>
#include <rte_compat.h>
#include <rte_ethdev.h>
diff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.h
index 46e9721e07..8d260584b4 100644
--- a/lib/ethdev/rte_ethdev_core.h
+++ b/lib/ethdev/rte_ethdev_core.h
@@ -5,8 +5,6 @@
#ifndef _RTE_ETHDEV_CORE_H_
#define _RTE_ETHDEV_CORE_H_
-#include <pthread.h>
-
/**
* @file
*
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 271d854f78..0c5aabea45 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -6,6 +6,7 @@
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
+#include <pthread.h>
#include <rte_common.h>
#include <rte_errno.h>
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index c166ef69a8..2145d803e4 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -4,6 +4,7 @@
*/
#include <ctype.h>
#include <stdlib.h>
+#include <pthread.h>
#if defined(LINUX)
#include <sys/epoll.h>
#endif
diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
index eb6309b681..c03bb9c6eb 100644
--- a/lib/vhost/vhost.c
+++ b/lib/vhost/vhost.c
@@ -6,6 +6,7 @@
#include <linux/virtio_net.h>
#include <stdint.h>
#include <stdlib.h>
+#include <pthread.h>
#ifdef RTE_LIBRTE_VHOST_NUMA
#include <numa.h>
#include <numaif.h>
--
2.42.0
next prev parent reply other threads:[~2023-09-06 16:24 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 16:12 [PATCH 00/11] rework thread management Thomas Monjalon
2023-09-06 16:12 ` [PATCH 01/11] devtools: warn when adding some pthread calls Thomas Monjalon
2023-09-07 8:20 ` David Marchand
2023-09-06 16:12 ` [PATCH 02/11] eal: rename thread name length definition Thomas Monjalon
2023-09-08 4:00 ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 03/11] eal: remove attributes from control thread creation Thomas Monjalon
2023-09-08 4:02 ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 04/11] eal: promote thread API as stable Thomas Monjalon
2023-09-08 4:04 ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 05/11] eal: force prefix for internal threads Thomas Monjalon
2023-09-07 8:28 ` David Marchand
2023-09-07 8:50 ` Morten Brørup
2023-09-07 8:53 ` David Marchand
2023-09-07 8:55 ` David Marchand
2023-09-07 11:10 ` Morten Brørup
2023-09-11 16:26 ` Thomas Monjalon
2023-09-11 21:32 ` Morten Brørup
2023-09-06 16:12 ` [PATCH 06/11] lib: convert to internal control threads Thomas Monjalon
2023-09-06 16:12 ` [PATCH 07/11] drivers: " Thomas Monjalon
2023-09-11 13:35 ` Andrew Rybchenko
2023-09-06 16:12 ` [PATCH 08/11] examples: convert to normal " Thomas Monjalon
2023-09-08 4:10 ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 09/11] test: convert threads creation Thomas Monjalon
2023-09-08 4:12 ` Tyler Retzlaff
2023-09-06 16:12 ` [PATCH 10/11] eal: remove deprecated thread functions Thomas Monjalon
2023-09-08 4:22 ` Tyler Retzlaff
2023-09-11 16:13 ` Thomas Monjalon
2023-09-12 0:49 ` Tyler Retzlaff
2023-09-06 16:12 ` Thomas Monjalon [this message]
2023-09-08 4:25 ` [PATCH 11/11] lib: remove pthread.h from includes Tyler Retzlaff
2023-09-08 4:49 ` Ajit Khaparde
2023-09-10 2:55 ` Xu, Rosen
2023-09-07 8:30 ` [PATCH 00/11] rework thread management Morten Brørup
2023-09-08 4:26 ` Tyler Retzlaff
2023-09-13 10:34 ` [PATCH v2 " Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 01/11] devtools: warn when adding some pthread calls Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 02/11] eal: rename thread name length definition Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 03/11] eal: remove attributes from control thread creation Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 04/11] eal: promote thread API as stable Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 05/11] eal: force prefix for internal threads Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 06/11] lib: convert to internal control threads Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 07/11] drivers: " Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 08/11] examples: convert to normal " Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 09/11] test: convert threads creation Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 10/11] eal: remove deprecated thread functions Thomas Monjalon
2023-09-13 10:34 ` [PATCH v2 11/11] lib: remove pthread.h from includes Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 00/11] rework thread management Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 01/11] devtools: warn when adding some pthread calls Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 02/11] eal: rename thread name length definition Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 03/11] eal: remove attributes from control thread creation Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 04/11] eal: promote thread API as stable Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 05/11] eal: force prefix for internal threads Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 06/11] lib: convert to internal control threads Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 07/11] drivers: " Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 08/11] examples: convert to normal " Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 09/11] test: convert threads creation Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 10/11] eal: remove deprecated thread functions Thomas Monjalon
2023-09-13 11:28 ` [PATCH v3 11/11] lib: remove pthread.h from includes Thomas Monjalon
2023-09-17 12:26 ` [PATCH v3 00/11] rework thread management Konstantin Ananyev
2023-09-22 13:46 ` David Marchand
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=20230906162226.1618088-12-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=ajit.khaparde@broadcom.com \
--cc=anatoly.burakov@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bruce.richardson@intel.com \
--cc=chas3@att.com \
--cc=chenbo.xia@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dsinghrawat@marvell.com \
--cc=ferruh.yigit@amd.com \
--cc=humin29@huawei.com \
--cc=jerinj@marvell.com \
--cc=matan@nvidia.com \
--cc=maxime.coquelin@redhat.com \
--cc=orika@nvidia.com \
--cc=palok@marvell.com \
--cc=roretzla@linux.microsoft.com \
--cc=rosen.xu@intel.com \
--cc=s.v.naga.harish.k@intel.com \
--cc=skori@marvell.com \
--cc=somnath.kotur@broadcom.com \
--cc=suanmingm@nvidia.com \
--cc=tianfei.zhang@intel.com \
--cc=viacheslavo@nvidia.com \
--cc=vsrivast@xilinx.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).