Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- include/vm/thread.h | 1 + vm/thread.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/vm/thread.h b/include/vm/thread.h index 407934e..39084a1 100644 --- a/include/vm/thread.h +++ b/include/vm/thread.h @@ -49,5 +49,6 @@ int vm_thread_start(struct vm_object *vmthread); void vm_thread_wait_for_non_daemons(void); void vm_thread_set_state(struct vm_thread *thread, enum vm_thread_state state); struct vm_object *vm_thread_get_java_thread(struct vm_thread *thread); +char *vm_thread_get_name(struct vm_thread *thread); #endif diff --git a/vm/thread.c b/vm/thread.c index d10a801..38d77d3 100644 --- a/vm/thread.c +++ b/vm/thread.c @@ -259,3 +259,14 @@ void vm_thread_wait_for_non_daemons(void) pthread_mutex_unlock(&threads_mutex); } + +char *vm_thread_get_name(struct vm_thread *thread) +{ + struct vm_object *jthread; + struct vm_object *name; + + jthread = vm_thread_get_java_thread(thread); + name = field_get_object(jthread, vm_java_lang_Thread_name); + + return vm_string_to_cstr(name); +} -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel