From 70686a71f66fff497a41cd98768f1e4267463d8b Mon Sep 17 00:00:00 2001 From: Marco Trudel Date: Wed, 17 Jan 2007 13:55:52 +0100 Subject: [PATCH] jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static. 2007-01-17 Marco Trudel * jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static. Use JNICALL. Fixed indentation. Removed unused variable. From-SVN: r120854 --- libjava/ChangeLog | 5 +++++ libjava/jvmti.cc | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d1377e669bc..e2ba835c48f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2007-01-17 Marco Trudel + + * jvmti.cc (_Jv_JVMTI_GetAllThreads): Now static. Use JNICALL. + Fixed indentation. Removed unused variable. + 2007-01-16 Tom Tromey * java/lang/natThread.cc (finalize_native): Remove cast. 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 *> (JvNewObjectArray - ((estimate * 2), - &Thread::class$, NULL)); + thr_arr = reinterpret_cast *> (JvNewObjectArray + ((estimate * 2), + &Thread::class$, NULL)); } catch (java::lang::OutOfMemoryError *err) {