Commit 70686a71 by Marco Trudel Committed by Tom Tromey

jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static.

2007-01-17  Marco Trudel  <mtrudel@gmx.ch>

	* jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static.  Use JNICALL.
	Fixed indentation.  Removed unused variable.

From-SVN: r120854
parent ceb84404
2007-01-17 Marco Trudel <mtrudel@gmx.ch>
* jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static. Use JNICALL.
Fixed indentation. Removed unused variable.
2007-01-16 Tom Tromey <tromey@redhat.com> 2007-01-16 Tom Tromey <tromey@redhat.com>
* java/lang/natThread.cc (finalize_native): Remove cast. * java/lang/natThread.cc (finalize_native): Remove cast.
......
// jvmti.cc - JVMTI implementation // jvmti.cc - JVMTI implementation
/* Copyright (C) 2006 Free Software Foundation /* Copyright (C) 2006, 2007 Free Software Foundation
This file is part of libgcj. This file is part of libgcj.
...@@ -198,7 +198,7 @@ _Jv_JVMTI_InterruptThread (MAYBE_UNUSED jvmtiEnv *env, jthread thread) ...@@ -198,7 +198,7 @@ _Jv_JVMTI_InterruptThread (MAYBE_UNUSED jvmtiEnv *env, jthread thread)
return JVMTI_ERROR_NONE; return JVMTI_ERROR_NONE;
} }
jvmtiError static jvmtiError JNICALL
_Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt, _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
jthread **threads) jthread **threads)
{ {
...@@ -207,7 +207,6 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt, ...@@ -207,7 +207,6 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
NULL_CHECK (threads); NULL_CHECK (threads);
using namespace java::lang; using namespace java::lang;
Thread *thr = Thread::currentThread ();
ThreadGroup *root_grp = ThreadGroup::root; ThreadGroup *root_grp = ThreadGroup::root;
jint estimate = root_grp->activeCount (); jint estimate = root_grp->activeCount ();
...@@ -217,10 +216,9 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt, ...@@ -217,10 +216,9 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
// Allocate some extra space since threads can be created between calls // Allocate some extra space since threads can be created between calls
try try
{ {
thr_arr thr_arr = reinterpret_cast<JArray<Thread *> *> (JvNewObjectArray
= reinterpret_cast<JArray<Thread *> *> (JvNewObjectArray ((estimate * 2),
((estimate * 2), &Thread::class$, NULL));
&Thread::class$, NULL));
} }
catch (java::lang::OutOfMemoryError *err) catch (java::lang::OutOfMemoryError *err)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment