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 4CF8DA054F; Mon, 27 Jun 2022 18:56:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D32D240A8B; Mon, 27 Jun 2022 18:56:09 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D458240685 for ; Mon, 27 Jun 2022 18:56:08 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0433520CD168; Mon, 27 Jun 2022 09:56:08 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0433520CD168 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1656348968; bh=fCnpJF5BbR1vko4wD56gsucEPLC53IgGlff9DgCEM8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HOfmy7nC601du6UHGTwDTYpfzN7mJ5PURT67gatBds6fK6yZSIBI0DR4aFpiMtmv2 4Nvss2tQ10WOdWIouN9uLGn24dXFnr8/l6WBklSknhwszGxLT3hAnMwUyTUWrlMmfD a48mQGE9Er3pqNqsKFeB3sPkYN/eFasxgjJ/4nmY= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, dmitry.kozliuk@gmail.com, anatoly.burakov@intel.com, Tyler Retzlaff Subject: [PATCH v4 0/6] add thread lifetime and attributes API Date: Mon, 27 Jun 2022 09:56:00 -0700 Message-Id: <1656348966-10194-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. 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 | 60 +++++++++++ lib/eal/include/rte_thread.h | 187 ++++++++++++++++++++++++++++++++++ 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, 705 insertions(+), 49 deletions(-) create mode 100644 lib/eal/common/rte_thread.c -- 1.8.3.1