On Thu, 24 Sep 2020 12:41:01 +0100 John Alexander <john.alexan...@datapath.co.uk> 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 <john.alexan...@datapath.co.uk> > --- > .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.