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 90748423BA; Thu, 12 Jan 2023 22:56:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E55F42DE6; Thu, 12 Jan 2023 22:55:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9901D42D52 for ; Thu, 12 Jan 2023 22:55:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id EE0F320DFE07; Thu, 12 Jan 2023 13:55:37 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EE0F320DFE07 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1673560537; bh=cQb0mh/cMWBN76joM3ue3JZ/RofIbQRlEyWeIIRuZy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gO/LITf7SzADHSEVOTln1wMienlzV/uoPnRGBgLcJvKfgi7EGvJdWeJmYz/G5lYOq 192z2aR02ffn0f5+64Oejg+lAIGikHq5i0K0chG2nOH09PetJ07TPlOVQ19XsmY67Y avCI/UsDUnkoJWc0wUwgqenD36pXc6YtvgjnFkTI= From: Tyler Retzlaff To: dev@dpdk.org Cc: thomas@monjalon.net, david.marchand@redhat.com, mb@smartsharesystems.com, Tyler Retzlaff Subject: [PATCH v3 2/4] eal: remove thread getname API Date: Thu, 12 Jan 2023 13:55:34 -0800 Message-Id: <1673560536-31057-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1673560536-31057-1-git-send-email-roretzla@linux.microsoft.com> References: <1670439617-9054-1-git-send-email-roretzla@linux.microsoft.com> <1673560536-31057-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 Remove the rte_thread_getname API. The API is __rte_experimental and requires no deprecation notice. Signed-off-by: Tyler Retzlaff --- lib/eal/common/eal_common_trace.c | 2 -- lib/eal/freebsd/eal_thread.c | 9 --------- lib/eal/include/rte_lcore.h | 17 ----------------- lib/eal/linux/eal_thread.c | 15 --------------- lib/eal/version.map | 1 - 5 files changed, 44 deletions(-) diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c index 5caaac8..89522dc 100644 --- a/lib/eal/common/eal_common_trace.c +++ b/lib/eal/common/eal_common_trace.c @@ -356,8 +356,6 @@ rte_trace_mode rte_trace_mode_get(void) /* Store the thread name */ char *name = header->stream_header.thread_name; memset(name, 0, __RTE_TRACE_EMIT_STRING_LEN_MAX); - rte_thread_getname(pthread_self(), name, - __RTE_TRACE_EMIT_STRING_LEN_MAX); trace->lcore_meta[count].mem = header; trace->nb_trace_mem_list++; diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c index b69f5d3..3227d9b 100644 --- a/lib/eal/freebsd/eal_thread.c +++ b/lib/eal/freebsd/eal_thread.c @@ -49,12 +49,3 @@ int rte_thread_setname(pthread_t id, const char *name) pthread_set_name_np(id, name); return 0; } - -int rte_thread_getname(pthread_t id, char *name, size_t len) -{ - RTE_SET_USED(id); - RTE_SET_USED(name); - RTE_SET_USED(len); - - return -ENOTSUP; -} diff --git a/lib/eal/include/rte_lcore.h b/lib/eal/include/rte_lcore.h index 6938c3f..9c78650 100644 --- a/lib/eal/include/rte_lcore.h +++ b/lib/eal/include/rte_lcore.h @@ -352,23 +352,6 @@ enum rte_lcore_role_t { int rte_thread_setname(pthread_t id, const char *name); /** - * Get thread name. - * - * @note It fails with glibc < 2.12. - * - * @param id - * Thread id. - * @param name - * Thread name to set. - * @param len - * Thread name buffer length. - * @return - * On success, return 0; otherwise return a negative value. - */ -__rte_experimental -int rte_thread_getname(pthread_t id, char *name, size_t len); - -/** * Register current non-EAL thread as a lcore. * * @note This API is not compatible with the multi-process feature: diff --git a/lib/eal/linux/eal_thread.c b/lib/eal/linux/eal_thread.c index d5fddab..c07ad9d 100644 --- a/lib/eal/linux/eal_thread.c +++ b/lib/eal/linux/eal_thread.c @@ -55,18 +55,3 @@ int rte_thread_setname(pthread_t id, const char *name) RTE_SET_USED(name); return -ret; } - -int rte_thread_getname(pthread_t id, char *name, size_t len) -{ - int ret = ENOSYS; -#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -#if __GLIBC_PREREQ(2, 12) - ret = pthread_getname_np(id, name, len); -#endif -#endif - RTE_SET_USED(id); - RTE_SET_USED(name); - RTE_SET_USED(len); - return -ret; - -} diff --git a/lib/eal/version.map b/lib/eal/version.map index c98ba71..6523102 100644 --- a/lib/eal/version.map +++ b/lib/eal/version.map @@ -369,7 +369,6 @@ EXPERIMENTAL { __rte_trace_point_register; per_lcore_trace_mem; per_lcore_trace_point_sz; - rte_thread_getname; # WINDOWS_NO_EXPORT rte_trace_dump; # WINDOWS_NO_EXPORT rte_trace_is_enabled; # WINDOWS_NO_EXPORT rte_trace_metadata_dump; # WINDOWS_NO_EXPORT -- 1.8.3.1