[4/5] eal: remove thread getname API

Message ID 1670439617-9054-5-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series add lcore set name and get name API |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff Dec. 7, 2022, 7 p.m. UTC
  Remove the rte_thread_getname API.  The API is __rte_experimental and
requires no deprecation notice.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 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 -
 4 files changed, 42 deletions(-)
  

Patch

diff --git a/lib/eal/freebsd/eal_thread.c b/lib/eal/freebsd/eal_thread.c
index af85c48..7d72c18 100644
--- a/lib/eal/freebsd/eal_thread.c
+++ b/lib/eal/freebsd/eal_thread.c
@@ -44,12 +44,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 251208f..944d89e 100644
--- a/lib/eal/include/rte_lcore.h
+++ b/lib/eal/include/rte_lcore.h
@@ -396,23 +396,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 2413bc6..5f56650 100644
--- a/lib/eal/linux/eal_thread.c
+++ b/lib/eal/linux/eal_thread.c
@@ -52,18 +52,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 4110f75..6881d19 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