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 AE237A0542; Wed, 5 Oct 2022 19:07:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6527440E2D; Wed, 5 Oct 2022 19:07:42 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 74F6740E2D for ; Wed, 5 Oct 2022 19:07:40 +0200 (CEST) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id 800A120E97CB; Wed, 5 Oct 2022 10:07:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 800A120E97CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1664989659; bh=TNAwIhppxP7XfkurMwrVVlm1fzMDdXNc+OV/4OPj+1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nW8zWot4pNoSh3PcCygbEEmoZme5vPCnnhfxP6blDZN67Qy5LoBj9StQN036xeW1n VLYYEqc4fjSBiHbknUfGZPHB1qhEBiPYO0cQak+VQeagA8NKSbYdM4rZae1R+R0fGa 28IxhIe5bl6dThrDgpTW7Ix1JKXrgCQlxQRr5QKc= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, dmitry.kozliuk@gmail.com, anatoly.burakov@intel.com, david.marchand@redhat.com Subject: [PATCH v5 0/6] add thread lifetime and attributes API Date: Wed, 5 Oct 2022 10:07:25 -0700 Message-Id: <1664989651-29303-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1654783134-13303-1-git-send-email-roretzla@linux.microsoft.com> References: <1654783134-13303-1-git-send-email-roretzla@linux.microsoft.com> 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 add rte thread lifetime and attributes api. with these api additions there is now sufficient platform abstracted thread api to remove the use of pthread in the unit tests. v5: * include errno.h in rte_thread.c since errno.h is no longer included in rte_common.h * move rte_thread_attr symbols from 22.07 to 22.11 section of version.map. * remove RTE_HAS_CPUSET guards from rte_thread.h * change case of characters in commit message for patches {6,5,4} of the series. v4: * update version.map to show api from series added in 22.11 instead of 22.07. * fix missing parameter name in rte_thread_func declaration causing doxygen ci failure. v3: * change rte_thread_func return type to uint32_t for exit value. * change rte_thread_join retval to be uint32_t (matched with the return value from rte_thread_func). * introduce a wrapper for rte_thread_func on posix platforms to adapt differences between rte_thread_func and pthread start_routine. * remove interpretation / dereference of result from pthread_join in posix implementation of rte_thread_join. * fix leak of dynamically allocated thread_routine_ctx on windows in error paths. * don't cast and truncate NULL to integer value for rte_thread_join when pthread_join returns no result. v2: * split implementation of rte_thread_equal for windows / posix and use pthread_equal for posix platforms. * remove parameter validation assertions and instead return EINVAL for mandatory pointers to type that are NULL. * correct doxygen comment parameter name args -> arg Tyler Retzlaff (6): eal: add thread attributes eal: add thread lifetime management eal: add basic rte thread ID equal API test/threads: add tests for thread lifetime API test/threads: add tests for thread attributes API test/threads: remove unit test use of pthread app/test/test_threads.c | 134 ++++++++++++++++++++++-- lib/eal/common/meson.build | 1 + lib/eal/common/rte_thread.c | 62 ++++++++++++ lib/eal/include/rte_thread.h | 185 ++++++++++++++++++++++++++++++++- lib/eal/unix/rte_thread.c | 141 ++++++++++++++++++++++++++ lib/eal/version.map | 10 ++ lib/eal/windows/include/sched.h | 2 +- lib/eal/windows/rte_thread.c | 219 ++++++++++++++++++++++++++++++++-------- 8 files changed, 702 insertions(+), 52 deletions(-) create mode 100644 lib/eal/common/rte_thread.c -- 1.8.3.1