From ea1fd78a25787d45832988883f49c4b3993ebf4b Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Mon, 29 Jul 2019 18:08:55 -0700 Subject: [PATCH] Remove mono_thread_get_name. (mono/mono#15875) Unused since https://github.com/mono/mono/commit/mono/mono@b5c0c831da328b8ab7b7283a38fa56baaa7ae380. And not likely to come back. Commit migrated from https://github.com/mono/mono/commit/f1958bacaad3efd3f6f824664d1db39d50d532bb --- src/mono/mono/metadata/threads-types.h | 2 -- src/mono/mono/metadata/threads.c | 28 ---------------------------- 2 files changed, 30 deletions(-) diff --git a/src/mono/mono/metadata/threads-types.h b/src/mono/mono/metadata/threads-types.h index f1f8367..01d82c9 100644 --- a/src/mono/mono/metadata/threads-types.h +++ b/src/mono/mono/metadata/threads-types.h @@ -356,8 +356,6 @@ void mono_thread_cleanup_apartment_state (void); void mono_threads_set_shutting_down (void); -gunichar2* mono_thread_get_name (MonoInternalThread *this_obj, guint32 *name_len); - MONO_API MonoException* mono_thread_get_undeniable_exception (void); ICALL_EXPORT diff --git a/src/mono/mono/metadata/threads.c b/src/mono/mono/metadata/threads.c index 2c03359..73de290 100644 --- a/src/mono/mono/metadata/threads.c +++ b/src/mono/mono/metadata/threads.c @@ -1790,34 +1790,6 @@ ves_icall_System_Threading_Thread_GetDomainID (MonoError *error) } #endif -/* - * mono_thread_get_name: - * - * Return the name of the thread. NAME_LEN is set to the length of the name. - * Return NULL if the thread has no name. The returned memory is owned by the - * caller. - */ -gunichar2* -mono_thread_get_name (MonoInternalThread *this_obj, guint32 *name_len) -{ - gunichar2 *res; - - LOCK_THREAD (this_obj); - - if (!this_obj->name) { - *name_len = 0; - res = NULL; - } else { - *name_len = this_obj->name_len; - res = g_new (gunichar2, this_obj->name_len); - memcpy (res, this_obj->name, sizeof (gunichar2) * this_obj->name_len); - } - - UNLOCK_THREAD (this_obj); - - return res; -} - /** * mono_thread_get_name_utf8: * \returns the name of the thread in UTF-8. -- 2.7.4