From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E52B42CBA; Wed, 14 Jun 2023 21:27:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C91940E0F; Wed, 14 Jun 2023 21:27:51 +0200 (CEST) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id E77E040DDB for ; Wed, 14 Jun 2023 21:27:49 +0200 (CEST) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-54fba092ef5so1499666a12.2 for ; Wed, 14 Jun 2023 12:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1686770869; x=1689362869; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=DmopdxItXDbSVebx0CYzuV89ZDrm+nJobWmDGz+DvuI=; b=GJexx4X5Gx/6LTLCmz/BYmpXelpVxqXMw8FegSsmNXCxN1wvcrUFGs/Tm45hoXndtx Hlo3p9ZtzHzRbnlkStgUzZX5vHntreMRM2t1R0sMIOa4LtH1zeMX+PnChiizICstk01L IE7AGBw2wEXtUy75v3F8wAHmuhRif9FgA2UhYRFj93xvFlGDPU+d1F1aBnAMSXT1+Tle DZyMgm4lRwXRvLAsuNihsxwU9z7rjRlWaMrHVAJdEV86yUoWkl5g5Sos5V14ccADLI1y Lwc5wTwXM0Mf16Jx9I8PygVckfWKvRSeehW7jEMPo1Nee2zC7rd0jHq7uXQ6IP6nX4CL aOuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686770869; x=1689362869; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DmopdxItXDbSVebx0CYzuV89ZDrm+nJobWmDGz+DvuI=; b=OwDHuIlWPonCDPhcPG5GA5R6J8GH0uXHmV/NOqnKXy5ApnrSvt4vj14vNL0OQam65z znJTIaoj/mL3yp4sLAjk5NmSb6CFEFXUxfT9v/vzjWLd2duo8I537G8h5zECxsjDSqye R9MiSAuMwfcTTRpC7h5lTmh89LtvQWBvbXl0b/Ns+SB3m72Y3QY1yOtGn3MJKxugBze4 uVWewMi3EuuY4G1u8AozOXqVEbLt2LG5sq0/5YfFAfI0AWTdZEDEF/+M/FQ23CdqbMI8 rfN7SyaLQLE2BUJX5JwTXVmNN/Xh+YrK3hMKG7AZnqyJsMfaU1PMGzP7cCp2XfXskjVC lvnw== X-Gm-Message-State: AC+VfDyzlrnGyvQ6rmuZXwuCNXSJoU+6EgkefImfjORARZTYIjTwF6tb bTRmfMAszYx9XjG+9TSB8ihRQg== X-Google-Smtp-Source: ACHHUZ7ebkbIu6LCqlZEtmu0I9nmQcRoWfcIFXcH0/5K6O6i7tBLl0dBtia5EIwvnOV/+TFRSwK+/Q== X-Received: by 2002:a17:90a:5e02:b0:25b:dc4b:611d with SMTP id w2-20020a17090a5e0200b0025bdc4b611dmr2524737pjf.26.1686770868950; Wed, 14 Jun 2023 12:27:48 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id s19-20020a17090a881300b002532ddc3a00sm13090420pjn.15.2023.06.14.12.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 12:27:48 -0700 (PDT) Date: Wed, 14 Jun 2023 12:27:47 -0700 From: Stephen Hemminger To: John Alexander Cc: dmitry.kozliuk@gmail.com, navasile@linux.microsoft.com, dmitrym@microsoft.com, pallavi.kadam@intel.com, richard.smith@datapath.co.uk, dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2] eal/windows: Switched to an external pthreads library Message-ID: <20230614122747.0e06ae5e@hermes.local> In-Reply-To: <20200924114101.174-1-john.alexander@datapath.co.uk> References: <20200924114101.174-1-john.alexander@datapath.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 24 Sep 2020 12:41:01 +0100 John Alexander wrote: > The Windows EAL build now pulls in the pthreads4w project as an external > subproject. The pthreads4w subproject does not currently provide a > meson build so the project has been patched with one. > > Removed the placeholder librte_eal\windows\include\pthread.h and sched.h > header files as these are superseded by the pthreads4w implementation. > > rte_eal_init() in the Windows EAL has been modified to use > pthread_create() and pthread_setaffinity_np() to setup the secondary > lcores. eal_thread_create() has been removed as it is no longer > required. > > rte_eal_init() in the Windows EAL now calls SetPriorityClass() to set > the process class to real-time in a singular location. > > eal_thread_loop() in the Windows EAL now calls SetThreadPriority() to > set the thread priority to real-time when the thread commences execution. > This function now uses pthreads functions to test and compare pthread_t > handles. > > Added the source file librte_eal\windows\windows_eal_impl.c. This source > file serves as a location for the implementation of auxiliary > functionality provided by the Windows EAL that would otherwise be provided > by the UNIX runtime. > > Added the pthreads4w shared library as a dependency to EAL library builds > for Windows builds only. The meson install step will install the > pthreads4w.dll that is built by the meson external subproject build step. > The shared library has been selected for both static and shared library > builds to avoid constructior initialisation issues observed when using > pthreads4w and static linkage within the DPDK project. > > Added the subprojects folder to the .gitignore file such that authored > content is not ignored and downloaded content is ignored (as that's where > meson stores the subprojects when they are cloned). > > Incremented the minimum meson version number to 0.55.0. This is required > to use the subproject folder patch feature. > > Updated MAINTAINERS to reflect new additions. > > Signed-off-by: John Alexander > --- > .gitignore | 6 + > MAINTAINERS | 3 + > lib/librte_eal/windows/eal.c | 21 ++- > lib/librte_eal/windows/eal_thread.c | 27 +--- > lib/librte_eal/windows/eal_windows.h | 10 -- > lib/librte_eal/windows/include/pthread.h | 146 ------------------ > lib/librte_eal/windows/include/rte_os.h | 15 +- > lib/librte_eal/windows/include/sched.h | 92 ----------- > lib/librte_eal/windows/meson.build | 1 + > lib/librte_eal/windows/windows_eal_impl.c | 53 +++++++ > lib/meson.build | 14 +- > meson.build | 7 +- > .../packagefiles/pthreads4w-meson/VERSION | 1 + > .../packagefiles/pthreads4w-meson/meson.build | 49 ++++++ > subprojects/pthreads4w-code.wrap | 8 + > 15 files changed, 178 insertions(+), 275 deletions(-) > delete mode 100644 lib/librte_eal/windows/include/pthread.h > delete mode 100644 lib/librte_eal/windows/include/sched.h > create mode 100644 lib/librte_eal/windows/windows_eal_impl.c > create mode 100644 subprojects/packagefiles/pthreads4w-meson/VERSION > create mode 100644 subprojects/packagefiles/pthreads4w-meson/meson.build > create mode 100644 subprojects/pthreads4w-code.wrap This patch is really old by now. The current windows port uses native windows threads in current code. Supporting an external package is not necessary.