summaryrefslogtreecommitdiff
path: root/libjava/jvmti.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-17 12:55:52 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-17 12:55:52 +0000
commit89adbfc5a80a5f27fc639681821ded31300d2f5c (patch)
tree28bd6c20fba37b39f189102df4833d15ec9b926c /libjava/jvmti.cc
parent8bbbac0cc3b85f9a82a168f52d7fcb71234aa4fd (diff)
downloadgcc-89adbfc5a80a5f27fc639681821ded31300d2f5c.tar.gz
2007-01-17 Marco Trudel <mtrudel@gmx.ch>
* jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static. Use JNICALL. Fixed indentation. Removed unused variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120854 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jvmti.cc')
-rw-r--r--libjava/jvmti.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/libjava/jvmti.cc b/libjava/jvmti.cc
index b9646b7d101..f6df8c56084 100644
--- a/libjava/jvmti.cc
+++ b/libjava/jvmti.cc
@@ -1,6 +1,6 @@
// jvmti.cc - JVMTI implementation
-/* Copyright (C) 2006 Free Software Foundation
+/* Copyright (C) 2006, 2007 Free Software Foundation
This file is part of libgcj.
@@ -198,7 +198,7 @@ _Jv_JVMTI_InterruptThread (MAYBE_UNUSED jvmtiEnv *env, jthread thread)
return JVMTI_ERROR_NONE;
}
-jvmtiError
+static jvmtiError JNICALL
_Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
jthread **threads)
{
@@ -207,7 +207,6 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
NULL_CHECK (threads);
using namespace java::lang;
- Thread *thr = Thread::currentThread ();
ThreadGroup *root_grp = ThreadGroup::root;
jint estimate = root_grp->activeCount ();
@@ -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
try
{
- thr_arr
- = reinterpret_cast<JArray<Thread *> *> (JvNewObjectArray
- ((estimate * 2),
- &Thread::class$, NULL));
+ thr_arr = reinterpret_cast<JArray<Thread *> *> (JvNewObjectArray
+ ((estimate * 2),
+ &Thread::class$, NULL));
}
catch (java::lang::OutOfMemoryError *err)
{