guint8 *p, *p_end;
MonoObject *exc;
- mono_thread_info_set_name (mono_native_thread_id_get (), "Attach receiver");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "Attach receiver");
printf ("attach: Listening on '%s'...\n", server_uri);
sgen_client_thread_register_worker (void)
{
mono_thread_info_register_small_id ();
- mono_thread_info_set_name (mono_native_thread_id_get (), "SGen worker");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "SGen worker");
}
/* Variables holding start/end nursery so it won't have to be passed at every call */
if (internal->name && (internal->flags & MONO_THREAD_FLAG_NAME_SET)) {
char *tname = g_utf16_to_utf8 (internal->name, internal->name_len, NULL, NULL, NULL);
mono_profiler_thread_name (internal->tid, tname);
- mono_thread_info_set_name (MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid), tname);
+ mono_native_thread_set_name (MONO_UINT_TO_NATIVE_THREAD_ID (internal->tid), tname);
g_free (tname);
}
/* start_func is set only for unmanaged start functions */
if (this_obj->name && this_obj->tid) {
char *tname = mono_string_to_utf8 (name);
mono_profiler_thread_name (this_obj->tid, tname);
- mono_thread_info_set_name (thread_get_tid (this_obj), tname);
+ mono_native_thread_set_name (thread_get_tid (this_obj), tname);
mono_free (tname);
}
}
* We only set the native name of the thread since MS.NET leaves the
* managed thread name for the main thread as null.
*/
- mono_thread_info_set_name (mono_native_thread_id_get (), "Main");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "Main");
if (enable_profile) {
mono_profiler_load (profile_options);
sampling_thread_func (void *data)
{
mono_threads_attach_tools_thread ();
- mono_thread_info_set_name (mono_native_thread_id_get (), "Profiler sampler");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "Profiler sampler");
gint64 rate = 1000000000 / mono_profiler_get_sampling_rate ();
MonoThread *thread = NULL;
mono_threads_attach_tools_thread ();
- mono_thread_info_set_name (mono_native_thread_id_get (), "Profiler helper");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "Profiler helper");
//fprintf (stderr, "Server listening\n");
command_socket = -1;
MonoProfiler *prof = (MonoProfiler *)arg;
mono_threads_attach_tools_thread ();
- mono_thread_info_set_name (mono_native_thread_id_get (), "Profiler writer");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "Profiler writer");
dump_header (prof);
MonoProfiler *prof = (MonoProfiler *)arg;
mono_threads_attach_tools_thread ();
- mono_thread_info_set_name (mono_native_thread_id_get (), "Profiler dumper");
+ mono_native_thread_set_name (mono_native_thread_id_get (), "Profiler dumper");
while (InterlockedRead (&prof->run_dumper_thread)) {
mono_os_sem_wait (&prof->dumper_queue_sem, MONO_SEM_FLAGS_NONE);
}
void
-mono_threads_core_set_name (MonoNativeThreadId tid, const char *name)
+mono_native_thread_set_name (MonoNativeThreadId tid, const char *name)
{
#ifdef __MACH__
/*
#endif
void
-mono_threads_core_set_name (MonoNativeThreadId tid, const char *name)
+mono_native_thread_set_name (MonoNativeThreadId tid, const char *name)
{
#if defined(_MSC_VER)
/* http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx */
return mono_threads_core_open_thread_handle (handle, tid);
}
-void
-mono_thread_info_set_name (MonoNativeThreadId tid, const char *name)
-{
- mono_threads_core_set_name (tid, name);
-}
-
#define INTERRUPT_STATE ((MonoThreadInfoInterruptToken*) (size_t) -1)
struct _MonoThreadInfoInterruptToken {
gboolean
mono_thread_info_resume (MonoNativeThreadId tid);
-MONO_API void
-mono_thread_info_set_name (MonoNativeThreadId tid, const char *name);
-
void
mono_thread_info_safe_suspend_and_run (MonoNativeThreadId id, gboolean interrupt_kernel, MonoSuspendThreadCallback callback, gpointer user_data);
void mono_threads_core_unregister (THREAD_INFO_TYPE *info);
HANDLE mono_threads_core_open_handle (void);
HANDLE mono_threads_core_open_thread_handle (HANDLE handle, MonoNativeThreadId tid);
-void mono_threads_core_set_name (MonoNativeThreadId tid, const char *name);
void mono_threads_coop_begin_global_suspend (void);
void mono_threads_coop_end_global_suspend (void);
gboolean
mono_native_thread_create (MonoNativeThreadId *tid, gpointer func, gpointer arg);
+MONO_API void
+mono_native_thread_set_name (MonoNativeThreadId tid, const char *name);
+
/*Mach specific internals */
void mono_threads_init_dead_letter (void);
void mono_threads_install_dead_letter (void);