[threads] Add function to stringify thread state names.
authorRodrigo Kumpera <kumpera@gmail.com>
Wed, 12 Aug 2015 05:31:44 +0000 (01:31 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Fri, 14 Aug 2015 20:28:21 +0000 (16:28 -0400)
mono/utils/mono-threads-state-machine.c
mono/utils/mono-threads.h

index 2c4bd023697d8585f9cdd139131461d4667ff8eb..fd98e04060de8c143e2216e5c0bab71334fbba7e 100644 (file)
@@ -691,3 +691,9 @@ mono_thread_info_current_state (MonoThreadInfo *info)
 {
        return get_thread_state (info->thread_state);
 }
+
+const char*
+mono_thread_state_name (int state)
+{
+       return state_name (state);
+}
index 7e00c04659582cd3a6a99db597974827f95029e2..67957c8f1981a285ecd36aff1af989e02f40f9c9 100644 (file)
@@ -632,6 +632,7 @@ gboolean mono_thread_info_is_running (THREAD_INFO_TYPE *info);
 gboolean mono_thread_info_is_live (THREAD_INFO_TYPE *info);
 int mono_thread_info_suspend_count (THREAD_INFO_TYPE *info);
 int mono_thread_info_current_state (THREAD_INFO_TYPE *info);
+const char* mono_thread_state_name (int state);
 
 gboolean mono_thread_info_in_critical_location (THREAD_INFO_TYPE *info);
 gboolean mono_thread_info_begin_suspend (THREAD_INFO_TYPE *info, gboolean interrupt_kernel);