get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/94537/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 94537,
    "url": "https://patches.dpdk.org/api/patches/94537/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1624067878-2130-5-git-send-email-navasile@linux.microsoft.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1624067878-2130-5-git-send-email-navasile@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1624067878-2130-5-git-send-email-navasile@linux.microsoft.com",
    "date": "2021-06-19T01:57:56",
    "name": "[v2,4/6] lib: enable the new EAL thread API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b98d3c66cc36e09974943db677582f0d493d1911",
    "submitter": {
        "id": 1668,
        "url": "https://patches.dpdk.org/api/people/1668/?format=api",
        "name": "Narcisa Ana Maria Vasile",
        "email": "navasile@linux.microsoft.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1624067878-2130-5-git-send-email-navasile@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 17404,
            "url": "https://patches.dpdk.org/api/series/17404/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17404",
            "date": "2021-06-19T01:57:54",
            "name": "Enable the internal EAL thread API",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/17404/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94537/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94537/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 65D37A0A0C;\n\tSat, 19 Jun 2021 03:58:31 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ED42641137;\n\tSat, 19 Jun 2021 03:58:15 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 50B93410E6\n for <dev@dpdk.org>; Sat, 19 Jun 2021 03:58:11 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1059)\n id 8120E20B83F2; Fri, 18 Jun 2021 18:58:10 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 8120E20B83F2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1624067890;\n bh=1W5YEipA+EDUMcx2RzeSXA0uSbQes2asbJS2KBUButM=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=mlh4IxgXZTjvx4YpxzcLCqPIzykSCxUmFPxlcVHAx/4ee3NU8iqBO6jf8ezTBq1Qa\n y/8glxWHCbbHgnThGkhY7Ym8tHwR9IwITZc0YzFjW/yeAPDoK3DHDNQZS7Dm+QbRaC\n nojpQPmcN8qKLTPPyaWApMUG3mP/8elkg8/6jMmY=",
        "From": "Narcisa Ana Maria Vasile <navasile@linux.microsoft.com>",
        "To": "dev@dpdk.org, thomas@monjalon.net, dmitry.kozliuk@gmail.com,\n khot@microsoft.com, navasile@microsoft.com, dmitrym@microsoft.com,\n roretzla@microsoft.com, talshn@nvidia.com, ocardona@microsoft.com",
        "Cc": "bruce.richardson@intel.com, david.marchand@redhat.com,\n pallavi.kadam@intel.com",
        "Date": "Fri, 18 Jun 2021 18:57:56 -0700",
        "Message-Id": "<1624067878-2130-5-git-send-email-navasile@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1624067878-2130-1-git-send-email-navasile@linux.microsoft.com>",
        "References": "<1624053294-31255-1-git-send-email-navasile@linux.microsoft.com>\n <1624067878-2130-1-git-send-email-navasile@linux.microsoft.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/6] lib: enable the new EAL thread API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Narcisa Vasile <navasile@microsoft.com>\n\nRename pthread* with the new rte_thread* API.\n\nDepends-on: series-17402 (\"eal: Add EAL API for threading\")\n\nSigned-off-by: Narcisa Vasile <navasile@microsoft.com>\n---\n lib/eal/common/eal_common_options.c     |  6 ++---\n lib/eal/common/eal_common_thread.c      | 13 +++++----\n lib/eal/common/eal_common_trace.c       |  1 +\n lib/eal/common/eal_private.h            |  2 +-\n lib/eal/common/malloc_mp.c              |  2 ++\n lib/eal/freebsd/eal.c                   | 18 ++++++-------\n lib/eal/freebsd/eal_alarm.c             | 12 ++++-----\n lib/eal/freebsd/eal_interrupts.c        |  6 ++---\n lib/eal/freebsd/eal_thread.c            | 10 ++++---\n lib/eal/include/rte_lcore.h             |  6 +++++\n lib/eal/include/rte_per_lcore.h         |  2 +-\n lib/eal/linux/eal.c                     | 22 ++++++++--------\n lib/eal/linux/eal_alarm.c               | 10 ++++---\n lib/eal/linux/eal_interrupts.c          |  8 +++---\n lib/eal/linux/eal_thread.c              | 11 +++++---\n lib/eal/linux/eal_timer.c               |  6 ++---\n lib/eal/version.map                     |  4 +--\n lib/eal/windows/eal.c                   |  4 ++-\n lib/eal/windows/eal_interrupts.c        | 10 +++----\n lib/eal/windows/eal_thread.c            | 35 ++++---------------------\n lib/eal/windows/eal_windows.h           | 10 -------\n lib/eal/windows/include/rte_windows.h   |  1 +\n lib/eal/windows/rte_thread.c            |  2 +-\n lib/ethdev/rte_ethdev.c                 |  4 +--\n lib/ethdev/rte_ethdev_core.h            |  4 +--\n lib/ethdev/rte_flow.c                   |  4 +--\n lib/eventdev/rte_event_eth_rx_adapter.c |  1 +\n lib/vhost/vhost.c                       |  1 +\n 28 files changed, 101 insertions(+), 114 deletions(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c\nindex 9d29696b84..1f6aba498c 100644\n--- a/lib/eal/common/eal_common_options.c\n+++ b/lib/eal/common/eal_common_options.c\n@@ -1872,8 +1872,7 @@ eal_auto_detect_cores(struct rte_config *cfg)\n \tunsigned int removed = 0;\n \trte_cpuset_t affinity_set;\n \n-\tif (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n-\t\t\t\t&affinity_set))\n+\tif (rte_thread_get_affinity_by_id(rte_thread_self(), &affinity_set))\n \t\tCPU_ZERO(&affinity_set);\n \n \tfor (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {\n@@ -1901,8 +1900,7 @@ compute_ctrl_threads_cpuset(struct internal_config *internal_cfg)\n \t}\n \tRTE_CPU_NOT(cpuset, cpuset);\n \n-\tif (pthread_getaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n-\t\t\t\t&default_set))\n+\tif (rte_thread_get_affinity_by_id(rte_thread_self(), &default_set))\n \t\tCPU_ZERO(&default_set);\n \n \tRTE_CPU_AND(cpuset, cpuset, &default_set);\ndiff --git a/lib/eal/common/eal_common_thread.c b/lib/eal/common/eal_common_thread.c\nindex 79545c67d9..62d28e7b28 100644\n--- a/lib/eal/common/eal_common_thread.c\n+++ b/lib/eal/common/eal_common_thread.c\n@@ -6,7 +6,10 @@\n #include <stdlib.h>\n #include <stdint.h>\n #include <unistd.h>\n+#ifndef RTE_EXEC_ENV_WINDOWS\n #include <pthread.h>\n+#endif /* RTE_EXEC_ENV_WINDOWS */\n+#include <rte_thread.h>\n #include <signal.h>\n #include <sched.h>\n #include <assert.h>\n@@ -86,9 +89,8 @@ thread_update_affinity(rte_cpuset_t *cpusetp)\n int\n rte_thread_set_affinity(rte_cpuset_t *cpusetp)\n {\n-\tif (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n-\t\t\tcpusetp) != 0) {\n-\t\tRTE_LOG(ERR, EAL, \"pthread_setaffinity_np failed\\n\");\n+\tif (rte_thread_set_affinity_by_id(rte_thread_self(), cpusetp) != 0) {\n+\t\tRTE_LOG(ERR, EAL, \"rte_thread_set_affinity_by_id failed\\n\");\n \t\treturn -1;\n \t}\n \n@@ -166,6 +168,7 @@ __rte_thread_uninit(void)\n \tRTE_PER_LCORE(_lcore_id) = LCORE_ID_ANY;\n }\n \n+#ifndef RTE_EXEC_ENV_WINDOWS\n struct rte_thread_ctrl_params {\n \tvoid *(*start_routine)(void *);\n \tvoid *arg;\n@@ -258,6 +261,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,\n \n \treturn -ret;\n }\n+#endif\n \n struct rte_thread_ctrl_ctx {\n \trte_thread_func start_routine;\n@@ -357,8 +361,7 @@ rte_thread_register(void)\n \t\trte_errno = EINVAL;\n \t\treturn -1;\n \t}\n-\tif (pthread_getaffinity_np(pthread_self(), sizeof(cpuset),\n-\t\t\t&cpuset) != 0)\n+\tif (rte_thread_get_affinity_by_id(rte_thread_self(), &cpuset) != 0)\n \t\tCPU_ZERO(&cpuset);\n \tlcore_id = eal_lcore_non_eal_allocate();\n \tif (lcore_id >= RTE_MAX_LCORE)\ndiff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c\nindex 24e27387b1..ddbc692cf2 100644\n--- a/lib/eal/common/eal_common_trace.c\n+++ b/lib/eal/common/eal_common_trace.c\n@@ -7,6 +7,7 @@\n #include <sys/queue.h>\n #include <regex.h>\n \n+#include <pthread.h>\n #include <rte_common.h>\n #include <rte_errno.h>\n #include <rte_lcore.h>\ndiff --git a/lib/eal/common/eal_private.h b/lib/eal/common/eal_private.h\nindex 64cf4e81c8..4b95001d7d 100644\n--- a/lib/eal/common/eal_private.h\n+++ b/lib/eal/common/eal_private.h\n@@ -19,7 +19,7 @@\n  * Structure storing internal configuration (per-lcore)\n  */\n struct lcore_config {\n-\tpthread_t thread_id;       /**< pthread identifier */\n+\trte_thread_t thread_id;       /**< pthread identifier */\n \tint pipe_main2worker[2];   /**< communication pipe with main */\n \tint pipe_worker2main[2];   /**< communication pipe with main */\n \ndiff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c\nindex 2e597a17a2..7f7109d954 100644\n--- a/lib/eal/common/malloc_mp.c\n+++ b/lib/eal/common/malloc_mp.c\n@@ -5,6 +5,8 @@\n #include <string.h>\n #include <sys/time.h>\n \n+#include <pthread.h>\n+\n #include <rte_alarm.h>\n #include <rte_errno.h>\n #include <rte_string_fns.h>\ndiff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c\nindex f4d1676754..b5cf050697 100644\n--- a/lib/eal/freebsd/eal.c\n+++ b/lib/eal/freebsd/eal.c\n@@ -9,7 +9,7 @@\n #include <string.h>\n #include <stdarg.h>\n #include <unistd.h>\n-#include <pthread.h>\n+#include <rte_thread.h>\n #include <syslog.h>\n #include <getopt.h>\n #include <sys/file.h>\n@@ -667,7 +667,7 @@ int\n rte_eal_init(int argc, char **argv)\n {\n \tint i, fctret, ret;\n-\tpthread_t thread_id;\n+\trte_thread_t thread_id;\n \tstatic uint32_t run_once;\n \tuint32_t has_run = 0;\n \tchar cpuset[RTE_CPU_AFFINITY_STR_LEN];\n@@ -690,7 +690,7 @@ rte_eal_init(int argc, char **argv)\n \t\treturn -1;\n \t}\n \n-\tthread_id = pthread_self();\n+\tthread_id = rte_thread_self();\n \n \teal_reset_internal_config(internal_conf);\n \n@@ -854,7 +854,7 @@ rte_eal_init(int argc, char **argv)\n \n \teal_check_mem_on_local_socket();\n \n-\tif (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n+\tif (rte_thread_set_affinity_by_id(rte_thread_self(),\n \t\t\t&lcore_config[config->main_lcore].cpuset) != 0) {\n \t\trte_eal_init_alert(\"Cannot set affinity\");\n \t\trte_errno = EINVAL;\n@@ -866,7 +866,7 @@ rte_eal_init(int argc, char **argv)\n \tret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));\n \n \tRTE_LOG(DEBUG, EAL, \"Main lcore %u is ready (tid=%p;cpuset=[%s%s])\\n\",\n-\t\tconfig->main_lcore, thread_id, cpuset,\n+\t\tconfig->main_lcore, (void *)thread_id.opaque_id, cpuset,\n \t\tret == 0 ? \"\" : \"...\");\n \n \tRTE_LCORE_FOREACH_WORKER(i) {\n@@ -883,7 +883,7 @@ rte_eal_init(int argc, char **argv)\n \t\tlcore_config[i].state = WAIT;\n \n \t\t/* create a thread for each lcore */\n-\t\tret = pthread_create(&lcore_config[i].thread_id, NULL,\n+\t\tret = rte_thread_create(&lcore_config[i].thread_id, NULL,\n \t\t\t\t     eal_thread_loop, NULL);\n \t\tif (ret != 0)\n \t\t\trte_panic(\"Cannot create thread\\n\");\n@@ -891,10 +891,10 @@ rte_eal_init(int argc, char **argv)\n \t\t/* Set thread_name for aid in debugging. */\n \t\tsnprintf(thread_name, sizeof(thread_name),\n \t\t\t\t\"lcore-worker-%d\", i);\n-\t\trte_thread_setname(lcore_config[i].thread_id, thread_name);\n+\t\trte_thread_name_set(lcore_config[i].thread_id, thread_name);\n \n-\t\tret = pthread_setaffinity_np(lcore_config[i].thread_id,\n-\t\t\tsizeof(rte_cpuset_t), &lcore_config[i].cpuset);\n+\t\tret = rte_thread_set_affinity_by_id(lcore_config[i].thread_id,\n+\t\t\t\t&lcore_config[i].cpuset);\n \t\tif (ret != 0)\n \t\t\trte_panic(\"Cannot set affinity\\n\");\n \t}\ndiff --git a/lib/eal/freebsd/eal_alarm.c b/lib/eal/freebsd/eal_alarm.c\nindex c38b2e04f8..e5d7b130b1 100644\n--- a/lib/eal/freebsd/eal_alarm.c\n+++ b/lib/eal/freebsd/eal_alarm.c\n@@ -37,7 +37,7 @@ struct alarm_entry {\n \trte_eal_alarm_callback cb_fn;\n \tvoid *cb_arg;\n \tvolatile uint8_t executing;\n-\tvolatile pthread_t executing_id;\n+\tvolatile rte_thread_t executing_id;\n };\n \n static LIST_HEAD(alarm_list, alarm_entry) alarm_list = LIST_HEAD_INITIALIZER();\n@@ -156,7 +156,7 @@ eal_alarm_callback(void *arg __rte_unused)\n \n \twhile (ap != NULL && timespec_cmp(&now, &ap->time) >= 0) {\n \t\tap->executing = 1;\n-\t\tap->executing_id = pthread_self();\n+\t\tap->executing_id = rte_thread_self();\n \t\trte_spinlock_unlock(&alarm_list_lk);\n \n \t\tap->cb_fn(ap->cb_arg);\n@@ -263,8 +263,8 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)\n \t\t\t\t * finish. Otherwise we are trying to cancel\n \t\t\t\t * ourselves - mark it by EINPROGRESS.\n \t\t\t\t */\n-\t\t\t\tif (pthread_equal(ap->executing_id,\n-\t\t\t\t\t\tpthread_self()) == 0)\n+\t\t\t\tif (rte_thread_equal(ap->executing_id,\n+\t\t\t\t\t\trte_thread_self()) == 0)\n \t\t\t\t\texecuting++;\n \t\t\t\telse\n \t\t\t\t\terr = EINPROGRESS;\n@@ -285,8 +285,8 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)\n \t\t\t\t\tfree(ap);\n \t\t\t\t\tcount++;\n \t\t\t\t\tap = ap_prev;\n-\t\t\t\t} else if (pthread_equal(ap->executing_id,\n-\t\t\t\t\t\t\t pthread_self()) == 0) {\n+\t\t\t\t} else if (rte_thread_equal(ap->executing_id,\n+\t\t\t\t\t\trte_thread_self()) == 0) {\n \t\t\t\t\texecuting++;\n \t\t\t\t} else {\n \t\t\t\t\terr = EINPROGRESS;\ndiff --git a/lib/eal/freebsd/eal_interrupts.c b/lib/eal/freebsd/eal_interrupts.c\nindex 86810845fe..61b6ef1f48 100644\n--- a/lib/eal/freebsd/eal_interrupts.c\n+++ b/lib/eal/freebsd/eal_interrupts.c\n@@ -52,7 +52,7 @@ static rte_spinlock_t intr_lock = RTE_SPINLOCK_INITIALIZER;\n static struct rte_intr_source_list intr_sources;\n \n /* interrupt handling thread */\n-static pthread_t intr_thread;\n+static rte_thread_t intr_thread;\n \n static volatile int kq = -1;\n \n@@ -628,7 +628,7 @@ rte_eal_intr_init(void)\n \t}\n \n \t/* create the host thread to wait/handle the interrupt */\n-\tret = rte_ctrl_thread_create(&intr_thread, \"eal-intr-thread\", NULL,\n+\tret = rte_thread_ctrl_thread_create(&intr_thread, \"eal-intr-thread\",\n \t\t\teal_intr_thread_main, NULL);\n \tif (ret != 0) {\n \t\trte_errno = -ret;\n@@ -737,5 +737,5 @@ rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle)\n \n int rte_thread_is_intr(void)\n {\n-\treturn pthread_equal(intr_thread, pthread_self());\n+\treturn rte_thread_equal(intr_thread, rte_thread_self());\n }\ndiff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c\nindex 1dce9b04f2..8c572c7930 100644\n--- a/lib/eal/freebsd/eal_thread.c\n+++ b/lib/eal/freebsd/eal_thread.c\n@@ -9,6 +9,7 @@\n #include <unistd.h>\n #include <sched.h>\n #include <pthread_np.h>\n+#include <rte_thread.h>\n #include <sys/queue.h>\n #include <sys/thr.h>\n \n@@ -73,15 +74,16 @@ eal_thread_loop(__rte_unused void *arg)\n \tchar c;\n \tint n, ret;\n \tunsigned lcore_id;\n-\tpthread_t thread_id;\n+\trte_thread_t thread_id;\n \tint m2w, w2m;\n \tchar cpuset[RTE_CPU_AFFINITY_STR_LEN];\n \n-\tthread_id = pthread_self();\n+\tthread_id = rte_thread_self();\n \n \t/* retrieve our lcore_id from the configuration structure */\n \tRTE_LCORE_FOREACH_WORKER(lcore_id) {\n-\t\tif (thread_id == lcore_config[lcore_id].thread_id)\n+\t\tif (rte_thread_equal(thread_id,\n+\t\t\t\tlcore_config[lcore_id].thread_id))\n \t\t\tbreak;\n \t}\n \tif (lcore_id == RTE_MAX_LCORE)\n@@ -94,7 +96,7 @@ eal_thread_loop(__rte_unused void *arg)\n \n \tret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));\n \tRTE_LOG(DEBUG, EAL, \"lcore %u is ready (tid=%p;cpuset=[%s%s])\\n\",\n-\t\tlcore_id, thread_id, cpuset, ret == 0 ? \"\" : \"...\");\n+\t\tlcore_id, (void *)thread_id.opaque_id, cpuset, ret == 0 ? \"\" : \"...\");\n \n \trte_eal_trace_thread_lcore_ready(lcore_id, cpuset);\n \ndiff --git a/lib/eal/include/rte_lcore.h b/lib/eal/include/rte_lcore.h\nindex 1550b75da0..8fab21299a 100644\n--- a/lib/eal/include/rte_lcore.h\n+++ b/lib/eal/include/rte_lcore.h\n@@ -362,6 +362,7 @@ __rte_experimental\n void\n rte_lcore_dump(FILE *f);\n \n+#ifndef RTE_EXEC_ENV_WINDOWS\n /**\n  * Set thread names.\n  *\n@@ -393,6 +394,8 @@ int rte_thread_setname(pthread_t id, const char *name);\n __rte_experimental\n int rte_thread_getname(pthread_t id, char *name, size_t len);\n \n+#endif /* !RTE_EXEC_ENV_WINDOWS */\n+\n /**\n  * Register current non-EAL thread as a lcore.\n  *\n@@ -417,6 +420,7 @@ __rte_experimental\n void\n rte_thread_unregister(void);\n \n+#ifndef RTE_EXEC_ENV_WINDOWS\n /**\n  * Create a control thread.\n  *\n@@ -444,6 +448,8 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,\n \t\tconst pthread_attr_t *attr,\n \t\tvoid *(*start_routine)(void *), void *arg);\n \n+#endif\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/eal/include/rte_per_lcore.h b/lib/eal/include/rte_per_lcore.h\nindex eaedf0cb37..df1e51dcb8 100644\n--- a/lib/eal/include/rte_per_lcore.h\n+++ b/lib/eal/include/rte_per_lcore.h\n@@ -22,7 +22,7 @@\n extern \"C\" {\n #endif\n \n-#include <pthread.h>\n+#include <rte_thread.h>\n \n /**\n  * Macro to define a per lcore variable \"var\" of type \"type\", don't\ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex ba19fc6347..7060856d84 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -9,7 +9,7 @@\n #include <string.h>\n #include <stdarg.h>\n #include <unistd.h>\n-#include <pthread.h>\n+#include <rte_thread.h>\n #include <syslog.h>\n #include <getopt.h>\n #include <sys/file.h>\n@@ -963,7 +963,7 @@ int\n rte_eal_init(int argc, char **argv)\n {\n \tint i, fctret, ret;\n-\tpthread_t thread_id;\n+\trte_thread_t thread_id;\n \tstatic uint32_t run_once;\n \tuint32_t has_run = 0;\n \tconst char *p;\n@@ -991,7 +991,7 @@ rte_eal_init(int argc, char **argv)\n \n \tp = strrchr(argv[0], '/');\n \tstrlcpy(logid, p ? p + 1 : argv[0], sizeof(logid));\n-\tthread_id = pthread_self();\n+\tthread_id = rte_thread_self();\n \n \teal_reset_internal_config(internal_conf);\n \n@@ -1219,7 +1219,7 @@ rte_eal_init(int argc, char **argv)\n \n \teal_check_mem_on_local_socket();\n \n-\tif (pthread_setaffinity_np(pthread_self(), sizeof(rte_cpuset_t),\n+\tif (rte_thread_set_affinity_by_id(rte_thread_self(),\n \t\t\t&lcore_config[config->main_lcore].cpuset) != 0) {\n \t\trte_eal_init_alert(\"Cannot set affinity\");\n \t\trte_errno = EINVAL;\n@@ -1229,8 +1229,8 @@ rte_eal_init(int argc, char **argv)\n \t\t&lcore_config[config->main_lcore].cpuset);\n \n \tret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));\n-\tRTE_LOG(DEBUG, EAL, \"Main lcore %u is ready (tid=%zx;cpuset=[%s%s])\\n\",\n-\t\tconfig->main_lcore, (uintptr_t)thread_id, cpuset,\n+\tRTE_LOG(DEBUG, EAL, \"Main lcore %u is ready (tid=%p;cpuset=[%s%s])\\n\",\n+\t\tconfig->main_lcore, (void *)thread_id.opaque_id, cpuset,\n \t\tret == 0 ? \"\" : \"...\");\n \n \tRTE_LCORE_FOREACH_WORKER(i) {\n@@ -1247,7 +1247,7 @@ rte_eal_init(int argc, char **argv)\n \t\tlcore_config[i].state = WAIT;\n \n \t\t/* create a thread for each lcore */\n-\t\tret = pthread_create(&lcore_config[i].thread_id, NULL,\n+\t\tret = rte_thread_create(&lcore_config[i].thread_id, NULL,\n \t\t\t\t     eal_thread_loop, NULL);\n \t\tif (ret != 0)\n \t\t\trte_panic(\"Cannot create thread\\n\");\n@@ -1255,14 +1255,14 @@ rte_eal_init(int argc, char **argv)\n \t\t/* Set thread_name for aid in debugging. */\n \t\tsnprintf(thread_name, sizeof(thread_name),\n \t\t\t\"lcore-worker-%d\", i);\n-\t\tret = rte_thread_setname(lcore_config[i].thread_id,\n-\t\t\t\t\t\tthread_name);\n+\t\tret = rte_thread_name_set(lcore_config[i].thread_id,\n+\t\t\t\tthread_name);\n \t\tif (ret != 0)\n \t\t\tRTE_LOG(DEBUG, EAL,\n \t\t\t\t\"Cannot set name for lcore thread\\n\");\n \n-\t\tret = pthread_setaffinity_np(lcore_config[i].thread_id,\n-\t\t\tsizeof(rte_cpuset_t), &lcore_config[i].cpuset);\n+\t\tret = rte_thread_set_affinity_by_id(lcore_config[i].thread_id,\n+\t\t\t\t&lcore_config[i].cpuset);\n \t\tif (ret != 0)\n \t\t\trte_panic(\"Cannot set affinity\\n\");\n \t}\ndiff --git a/lib/eal/linux/eal_alarm.c b/lib/eal/linux/eal_alarm.c\nindex 3252c6fa59..fef22a347c 100644\n--- a/lib/eal/linux/eal_alarm.c\n+++ b/lib/eal/linux/eal_alarm.c\n@@ -48,7 +48,7 @@ struct alarm_entry {\n \trte_eal_alarm_callback cb_fn;\n \tvoid *cb_arg;\n \tvolatile uint8_t executing;\n-\tvolatile pthread_t executing_id;\n+\tvolatile rte_thread_t executing_id;\n };\n \n static LIST_HEAD(alarm_list, alarm_entry) alarm_list = LIST_HEAD_INITIALIZER();\n@@ -86,7 +86,7 @@ eal_alarm_callback(void *arg __rte_unused)\n \t\t\t(ap->time.tv_sec < now.tv_sec || (ap->time.tv_sec == now.tv_sec &&\n \t\t\t\t\t\t(ap->time.tv_usec * NS_PER_US) <= now.tv_nsec))) {\n \t\tap->executing = 1;\n-\t\tap->executing_id = pthread_self();\n+\t\tap->executing_id = rte_thread_self();\n \t\trte_spinlock_unlock(&alarm_list_lk);\n \n \t\tap->cb_fn(ap->cb_arg);\n@@ -207,7 +207,8 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)\n \t\t\t\t/* If calling from other context, mark that alarm is executing\n \t\t\t\t * so loop can spin till it finish. Otherwise we are trying to\n \t\t\t\t * cancel our self - mark it by EINPROGRESS */\n-\t\t\t\tif (pthread_equal(ap->executing_id, pthread_self()) == 0)\n+\t\t\t\tif (rte_thread_equal(ap->executing_id,\n+\t\t\t\t\t\trte_thread_self()) == 0)\n \t\t\t\t\texecuting++;\n \t\t\t\telse\n \t\t\t\t\terr = EINPROGRESS;\n@@ -228,7 +229,8 @@ rte_eal_alarm_cancel(rte_eal_alarm_callback cb_fn, void *cb_arg)\n \t\t\t\t\tfree(ap);\n \t\t\t\t\tcount++;\n \t\t\t\t\tap = ap_prev;\n-\t\t\t\t} else if (pthread_equal(ap->executing_id, pthread_self()) == 0)\n+\t\t\t\t} else if (rte_thread_equal(ap->executing_id,\n+\t\t\t\t\t\trte_thread_self()) == 0)\n \t\t\t\t\texecuting++;\n \t\t\t\telse\n \t\t\t\t\terr = EINPROGRESS;\ndiff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c\nindex 22b3b7bcd9..d8ce854d90 100644\n--- a/lib/eal/linux/eal_interrupts.c\n+++ b/lib/eal/linux/eal_interrupts.c\n@@ -5,7 +5,7 @@\n #include <stdio.h>\n #include <stdint.h>\n #include <stdlib.h>\n-#include <pthread.h>\n+#include <rte_thread.h>\n #include <sys/queue.h>\n #include <stdarg.h>\n #include <unistd.h>\n@@ -97,7 +97,7 @@ static union intr_pipefds intr_pipe;\n static struct rte_intr_source_list intr_sources;\n \n /* interrupt handling thread */\n-static pthread_t intr_thread;\n+static rte_thread_t intr_thread;\n \n /* VFIO interrupts */\n #ifdef VFIO_PRESENT\n@@ -1167,7 +1167,7 @@ rte_eal_intr_init(void)\n \t}\n \n \t/* create the host thread to wait/handle the interrupt */\n-\tret = rte_ctrl_thread_create(&intr_thread, \"eal-intr-thread\", NULL,\n+\tret = rte_thread_ctrl_thread_create(&intr_thread, \"eal-intr-thread\",\n \t\t\teal_intr_thread_main, NULL);\n \tif (ret != 0) {\n \t\trte_errno = -ret;\n@@ -1570,5 +1570,5 @@ rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)\n \n int rte_thread_is_intr(void)\n {\n-\treturn pthread_equal(intr_thread, pthread_self());\n+\treturn rte_thread_equal(intr_thread, rte_thread_self());\n }\ndiff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c\nindex 83c2034b93..91c239a217 100644\n--- a/lib/eal/linux/eal_thread.c\n+++ b/lib/eal/linux/eal_thread.c\n@@ -8,6 +8,7 @@\n #include <stdint.h>\n #include <unistd.h>\n #include <pthread.h>\n+#include <rte_thread.h>\n #include <sched.h>\n #include <sys/queue.h>\n #include <sys/syscall.h>\n@@ -73,15 +74,16 @@ eal_thread_loop(__rte_unused void *arg)\n \tchar c;\n \tint n, ret;\n \tunsigned lcore_id;\n-\tpthread_t thread_id;\n+\trte_thread_t thread_id;\n \tint m2w, w2m;\n \tchar cpuset[RTE_CPU_AFFINITY_STR_LEN];\n \n-\tthread_id = pthread_self();\n+\tthread_id = rte_thread_self();\n \n \t/* retrieve our lcore_id from the configuration structure */\n \tRTE_LCORE_FOREACH_WORKER(lcore_id) {\n-\t\tif (thread_id == lcore_config[lcore_id].thread_id)\n+\t\tif (rte_thread_equal(thread_id,\n+\t\t\t\tlcore_config[lcore_id].thread_id))\n \t\t\tbreak;\n \t}\n \tif (lcore_id == RTE_MAX_LCORE)\n@@ -94,7 +96,8 @@ eal_thread_loop(__rte_unused void *arg)\n \n \tret = eal_thread_dump_current_affinity(cpuset, sizeof(cpuset));\n \tRTE_LOG(DEBUG, EAL, \"lcore %u is ready (tid=%zx;cpuset=[%s%s])\\n\",\n-\t\tlcore_id, (uintptr_t)thread_id, cpuset, ret == 0 ? \"\" : \"...\");\n+\t\tlcore_id, (uintptr_t)thread_id.opaque_id, cpuset,\n+\t\tret == 0 ? \"\" : \"...\");\n \n \trte_eal_trace_thread_lcore_ready(lcore_id, cpuset);\n \ndiff --git a/lib/eal/linux/eal_timer.c b/lib/eal/linux/eal_timer.c\nindex 7cf15cabac..dc0308c761 100644\n--- a/lib/eal/linux/eal_timer.c\n+++ b/lib/eal/linux/eal_timer.c\n@@ -12,7 +12,7 @@\n #include <inttypes.h>\n #include <sys/mman.h>\n #include <sys/queue.h>\n-#include <pthread.h>\n+#include <rte_thread.h>\n #include <errno.h>\n \n #include <rte_common.h>\n@@ -80,7 +80,7 @@ static uint64_t eal_hpet_resolution_hz = 0;\n /* Incremented 4 times during one 32bits hpet full count */\n static uint32_t eal_hpet_msb;\n \n-static pthread_t msb_inc_thread_id;\n+static rte_thread_t msb_inc_thread_id;\n \n /*\n  * This function runs on a specific thread to update a global variable\n@@ -185,7 +185,7 @@ rte_eal_hpet_init(int make_default)\n \n \t/* create a thread that will increment a global variable for\n \t * msb (hpet is 32 bits by default under linux) */\n-\tret = rte_ctrl_thread_create(&msb_inc_thread_id, \"hpet-msb-inc\", NULL,\n+\tret = rte_thread_ctrl_thread_create(&msb_inc_thread_id, \"hpet-msb-inc\",\n \t\t\t\t     hpet_msb_inc, NULL);\n \tif (ret != 0) {\n \t\tRTE_LOG(ERR, EAL, \"ERROR: Cannot create HPET timer thread!\\n\");\ndiff --git a/lib/eal/version.map b/lib/eal/version.map\nindex 02455a1c8d..9d17e45b96 100644\n--- a/lib/eal/version.map\n+++ b/lib/eal/version.map\n@@ -21,7 +21,7 @@ DPDK_21 {\n \trte_cpu_get_flag_enabled;\n \trte_cpu_get_flag_name;\n \trte_cpu_is_supported; # WINDOWS_NO_EXPORT\n-\trte_ctrl_thread_create;\n+\trte_ctrl_thread_create; # WINDOWS_NO_EXPORT\n \trte_cycles_vmware_tsc_map; # WINDOWS_NO_EXPORT\n \trte_delay_us;\n \trte_delay_us_block;\n@@ -193,7 +193,7 @@ DPDK_21 {\n \trte_sys_gettid;\n \trte_thread_get_affinity;\n \trte_thread_set_affinity;\n-\trte_thread_setname;\n+\trte_thread_setname; # WINDOWS_NO_EXPORT\n \trte_uuid_compare; # WINDOWS_NO_EXPORT\n \trte_uuid_is_null; # WINDOWS_NO_EXPORT\n \trte_uuid_parse; # WINDOWS_NO_EXPORT\ndiff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c\nindex 28c787c0b0..65be582b99 100644\n--- a/lib/eal/windows/eal.c\n+++ b/lib/eal/windows/eal.c\n@@ -391,7 +391,9 @@ rte_eal_init(int argc, char **argv)\n \t\tlcore_config[i].state = WAIT;\n \n \t\t/* create a thread for each lcore */\n-\t\tif (eal_thread_create(&lcore_config[i].thread_id) != 0)\n+\t\tret = rte_thread_create(&lcore_config[i].thread_id, NULL,\n+\t\t\t\teal_thread_loop, NULL);\n+\t\tif (ret != 0)\n \t\t\trte_panic(\"Cannot create thread\\n\");\n \t}\n \ndiff --git a/lib/eal/windows/eal_interrupts.c b/lib/eal/windows/eal_interrupts.c\nindex 1d4cf794df..b95c8f6f93 100644\n--- a/lib/eal/windows/eal_interrupts.c\n+++ b/lib/eal/windows/eal_interrupts.c\n@@ -7,7 +7,7 @@\n #include \"eal_private.h\"\n #include \"eal_windows.h\"\n \n-static pthread_t intr_thread;\n+static rte_thread_t intr_thread;\n \n static HANDLE intr_iocp;\n \n@@ -63,7 +63,7 @@ rte_eal_intr_init(void)\n \t\treturn -1;\n \t}\n \n-\tret = rte_ctrl_thread_create(&intr_thread, \"eal-intr-thread\", NULL,\n+\tret = rte_thread_ctrl_thread_create(&intr_thread, \"eal-intr-thread\",\n \t\t\teal_intr_thread_main, NULL);\n \tif (ret != 0) {\n \t\trte_errno = -ret;\n@@ -76,7 +76,7 @@ rte_eal_intr_init(void)\n int\n rte_thread_is_intr(void)\n {\n-\treturn pthread_equal(intr_thread, pthread_self());\n+\treturn rte_thread_equal(intr_thread, rte_thread_self());\n }\n \n int\n@@ -92,9 +92,9 @@ eal_intr_thread_schedule(void (*func)(void *arg), void *arg)\n {\n \tHANDLE handle;\n \n-\thandle = OpenThread(THREAD_ALL_ACCESS, FALSE, intr_thread);\n+\thandle = OpenThread(THREAD_ALL_ACCESS, FALSE, intr_thread.opaque_id);\n \tif (handle == NULL) {\n-\t\tRTE_LOG_WIN32_ERR(\"OpenThread(%llu)\", intr_thread);\n+\t\tRTE_LOG_WIN32_ERR(\"OpenThread(%llu)\", intr_thread.opaque_id);\n \t\treturn -ENOENT;\n \t}\n \ndiff --git a/lib/eal/windows/eal_thread.c b/lib/eal/windows/eal_thread.c\nindex 9c3f6d69fd..fbdb7dbc76 100644\n--- a/lib/eal/windows/eal_thread.c\n+++ b/lib/eal/windows/eal_thread.c\n@@ -60,15 +60,16 @@ eal_thread_loop(void *arg __rte_unused)\n \tchar c;\n \tint n, ret;\n \tunsigned int lcore_id;\n-\tpthread_t thread_id;\n+\trte_thread_t thread_id;\n \tint m2w, w2m;\n \tchar cpuset[RTE_CPU_AFFINITY_STR_LEN];\n \n-\tthread_id = pthread_self();\n+\tthread_id = rte_thread_self();\n \n \t/* retrieve our lcore_id from the configuration structure */\n \tRTE_LCORE_FOREACH_WORKER(lcore_id) {\n-\t\tif (thread_id == lcore_config[lcore_id].thread_id)\n+\t\tif (rte_thread_equal(thread_id,\n+\t\t\t\tlcore_config[lcore_id].thread_id))\n \t\t\tbreak;\n \t}\n \tif (lcore_id == RTE_MAX_LCORE)\n@@ -80,7 +81,7 @@ eal_thread_loop(void *arg __rte_unused)\n \t__rte_thread_init(lcore_id, &lcore_config[lcore_id].cpuset);\n \n \tRTE_LOG(DEBUG, EAL, \"lcore %u is ready (tid=%zx;cpuset=[%s])\\n\",\n-\t\tlcore_id, (uintptr_t)thread_id, cpuset);\n+\t\tlcore_id, (uintptr_t)thread_id.opaque_id, cpuset);\n \n \t/* read on our pipe to get commands */\n \twhile (1) {\n@@ -122,35 +123,9 @@ eal_thread_loop(void *arg __rte_unused)\n \t}\n }\n \n-/* function to create threads */\n-int\n-eal_thread_create(pthread_t *thread)\n-{\n-\tHANDLE th;\n-\n-\tth = CreateThread(NULL, 0,\n-\t\t(LPTHREAD_START_ROUTINE)(ULONG_PTR)eal_thread_loop,\n-\t\t\t\t\t\tNULL, 0, (LPDWORD)thread);\n-\tif (!th)\n-\t\treturn -1;\n-\n-\tSetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);\n-\tSetThreadPriority(th, THREAD_PRIORITY_NORMAL);\n-\n-\treturn 0;\n-}\n-\n /* get current thread ID */\n int\n rte_sys_gettid(void)\n {\n \treturn GetCurrentThreadId();\n }\n-\n-int\n-rte_thread_setname(__rte_unused pthread_t id, __rte_unused const char *name)\n-{\n-\t/* TODO */\n-\t/* This is a stub, not the expected result */\n-\treturn 0;\n-}\ndiff --git a/lib/eal/windows/eal_windows.h b/lib/eal/windows/eal_windows.h\nindex dc5dc8240a..4b92b198c7 100644\n--- a/lib/eal/windows/eal_windows.h\n+++ b/lib/eal/windows/eal_windows.h\n@@ -35,16 +35,6 @@\n  */\n int eal_create_cpu_map(void);\n \n-/**\n- * Create a thread.\n- *\n- * @param thread\n- *   The location to store the thread id if successful.\n- * @return\n- *   0 for success, -1 if the thread is not created.\n- */\n-int eal_thread_create(pthread_t *thread);\n-\n /**\n  * Get system NUMA node number for a socket ID.\n  *\ndiff --git a/lib/eal/windows/include/rte_windows.h b/lib/eal/windows/include/rte_windows.h\nindex 0063b5d78c..d8c4ed10d7 100644\n--- a/lib/eal/windows/include/rte_windows.h\n+++ b/lib/eal/windows/include/rte_windows.h\n@@ -28,6 +28,7 @@\n #include <windows.h>\n \n #include <basetsd.h>\n+#include <processthreadsapi.h>\n #include <psapi.h>\n #include <setupapi.h>\n #include <winioctl.h>\ndiff --git a/lib/eal/windows/rte_thread.c b/lib/eal/windows/rte_thread.c\nindex 995ae2491d..a1d89a8d63 100644\n--- a/lib/eal/windows/rte_thread.c\n+++ b/lib/eal/windows/rte_thread.c\n@@ -594,7 +594,7 @@ rte_thread_name_set(rte_thread_t thread_id, const char *name)\n \t}\n \n \tcount = mbstowcs(w_name, name, RTE_THREAD_MAX_DESCRIPTION_LENGTH);\n-\tif (count < 0) {\n+\tif (count == (size_t) (-1)) {\n \t\tRTE_LOG(DEBUG, EAL, \"Invalid thread name!\\n\");\n \t\tret = EINVAL;\n \t\tgoto cleanup;\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex c607eabb5b..bc0a4c973a 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -526,7 +526,7 @@ rte_eth_dev_allocate(const char *name)\n \tstrlcpy(eth_dev->data->name, name, sizeof(eth_dev->data->name));\n \teth_dev->data->port_id = port_id;\n \teth_dev->data->mtu = RTE_ETHER_MTU;\n-\tpthread_mutex_init(&eth_dev->data->flow_ops_mutex, NULL);\n+\trte_thread_mutex_init(&eth_dev->data->flow_ops_mutex);\n \n unlock:\n \trte_spinlock_unlock(&eth_dev_shared_data->ownership_lock);\n@@ -600,7 +600,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)\n \t\trte_free(eth_dev->data->mac_addrs);\n \t\trte_free(eth_dev->data->hash_mac_addrs);\n \t\trte_free(eth_dev->data->dev_private);\n-\t\tpthread_mutex_destroy(&eth_dev->data->flow_ops_mutex);\n+\t\trte_thread_mutex_destroy(&eth_dev->data->flow_ops_mutex);\n \t\tmemset(eth_dev->data, 0, sizeof(struct rte_eth_dev_data));\n \t}\n \ndiff --git a/lib/ethdev/rte_ethdev_core.h b/lib/ethdev/rte_ethdev_core.h\nindex 4679d948fa..c4a6ea9774 100644\n--- a/lib/ethdev/rte_ethdev_core.h\n+++ b/lib/ethdev/rte_ethdev_core.h\n@@ -5,7 +5,7 @@\n #ifndef _RTE_ETHDEV_CORE_H_\n #define _RTE_ETHDEV_CORE_H_\n \n-#include <pthread.h>\n+#include <rte_thread.h>\n \n /**\n  * @file\n@@ -182,7 +182,7 @@ struct rte_eth_dev_data {\n \t\t\t *   Valid if RTE_ETH_DEV_REPRESENTOR in dev_flags.\n \t\t\t */\n \n-\tpthread_mutex_t flow_ops_mutex; /**< rte_flow ops mutex. */\n+\trte_thread_mutex flow_ops_mutex; /**< rte_flow ops mutex. */\n \tuint64_t reserved_64s[4]; /**< Reserved for future fields */\n \tvoid *reserved_ptrs[4];   /**< Reserved for future fields */\n } __rte_cache_aligned;\ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex 8cb7a069c8..4f112d1af7 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -226,14 +226,14 @@ static inline void\n fts_enter(struct rte_eth_dev *dev)\n {\n \tif (!(dev->data->dev_flags & RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE))\n-\t\tpthread_mutex_lock(&dev->data->flow_ops_mutex);\n+\t\trte_thread_mutex_lock(&dev->data->flow_ops_mutex);\n }\n \n static inline void\n fts_exit(struct rte_eth_dev *dev)\n {\n \tif (!(dev->data->dev_flags & RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE))\n-\t\tpthread_mutex_unlock(&dev->data->flow_ops_mutex);\n+\t\trte_thread_mutex_unlock(&dev->data->flow_ops_mutex);\n }\n \n static int\ndiff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c\nindex 13dfb28401..47f10cf5a9 100644\n--- a/lib/eventdev/rte_event_eth_rx_adapter.c\n+++ b/lib/eventdev/rte_event_eth_rx_adapter.c\n@@ -7,6 +7,7 @@\n #endif\n #include <unistd.h>\n \n+#include <pthread.h>\n #include <rte_cycles.h>\n #include <rte_common.h>\n #include <rte_dev.h>\ndiff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c\nindex c96f6335c8..85572354ae 100644\n--- a/lib/vhost/vhost.c\n+++ b/lib/vhost/vhost.c\n@@ -12,6 +12,7 @@\n #include <numaif.h>\n #endif\n \n+#include <pthread.h>\n #include <rte_errno.h>\n #include <rte_ethdev.h>\n #include <rte_log.h>\n",
    "prefixes": [
        "v2",
        "4/6"
    ]
}