aboutsummaryrefslogtreecommitdiff
path: root/libjava/jvmti.cc
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2007-01-29 17:43:34 +0000
committerKeith Seitz <kseitz@gcc.gnu.org>2007-01-29 17:43:34 +0000
commit68254f23e8c232a4da9b6f0e3fdabe1800a4b014 (patch)
tree186cf38e0affab2bbcb19802d5501e67e12a76eb /libjava/jvmti.cc
parent48e540b04f64910218cc702d0e05760e2eb1ef44 (diff)
downloadgcc-68254f23e8c232a4da9b6f0e3fdabe1800a4b014.zip
gcc-68254f23e8c232a4da9b6f0e3fdabe1800a4b014.tar.gz
gcc-68254f23e8c232a4da9b6f0e3fdabe1800a4b014.tar.bz2
jvmti_md.h (_CLASSPATH_VM_JVMTI_TYPES_DEFINED): Define.
* include/jvmti_md.h (_CLASSPATH_VM_JVMTI_TYPES_DEFINED): Define. [__GCJ_JNI_IMPL__]: Define our own JVMTI types when building gcj. All jvmti object types now are defined to be their corresponding java classes. * jvmti.cc (_Jv_JVMTI_SuspendThread): Remove casting from jthread to Thread*. (_Jv_JVMTI_ResumeThread): Likewise. (_Jv_JVMTI_InterruptThread): Likewise. (_Jv_JVMTI_SetEventNotificationMode): Likewise. * gnu/classpath/jdwp/natVMVirtualMachine.cc (jdwpClassPrepareCB): Likewise. (jdwpThreadEndCB): Likewise. (jdwpThreadStartCB): Likewise. (jdwpVMInitCB): Likewise. From-SVN: r121296
Diffstat (limited to 'libjava/jvmti.cc')
-rw-r--r--libjava/jvmti.cc29
1 files changed, 11 insertions, 18 deletions
diff --git a/libjava/jvmti.cc b/libjava/jvmti.cc
index f732984..03eec74 100644
--- a/libjava/jvmti.cc
+++ b/libjava/jvmti.cc
@@ -155,12 +155,10 @@ _Jv_JVMTI_SuspendThread (MAYBE_UNUSED jvmtiEnv *env, jthread thread)
using namespace java::lang;
THREAD_DEFAULT_TO_CURRENT (thread);
-
- Thread *t = reinterpret_cast<Thread *> (thread);
- THREAD_CHECK_VALID (t);
- THREAD_CHECK_IS_ALIVE (t);
+ THREAD_CHECK_VALID (thread);
+ THREAD_CHECK_IS_ALIVE (thread);
- _Jv_Thread_t *data = _Jv_ThreadGetData (t);
+ _Jv_Thread_t *data = _Jv_ThreadGetData (thread);
_Jv_SuspendThread (data);
return JVMTI_ERROR_NONE;
}
@@ -171,12 +169,10 @@ _Jv_JVMTI_ResumeThread (MAYBE_UNUSED jvmtiEnv *env, jthread thread)
using namespace java::lang;
THREAD_DEFAULT_TO_CURRENT (thread);
+ THREAD_CHECK_VALID (thread);
+ THREAD_CHECK_IS_ALIVE (thread);
- Thread *t = reinterpret_cast<Thread *> (thread);
- THREAD_CHECK_VALID (t);
- THREAD_CHECK_IS_ALIVE (t);
-
- _Jv_Thread_t *data = _Jv_ThreadGetData (t);
+ _Jv_Thread_t *data = _Jv_ThreadGetData (thread);
_Jv_ResumeThread (data);
return JVMTI_ERROR_NONE;
}
@@ -191,10 +187,9 @@ _Jv_JVMTI_InterruptThread (MAYBE_UNUSED jvmtiEnv *env, jthread thread)
if (thread == NULL)
return JVMTI_ERROR_INVALID_THREAD;
- Thread *real_thread = reinterpret_cast<Thread *> (thread);
- THREAD_CHECK_VALID (real_thread);
- THREAD_CHECK_IS_ALIVE (real_thread);
- real_thread->interrupt();
+ THREAD_CHECK_VALID (thread);
+ THREAD_CHECK_IS_ALIVE (thread);
+ thread->interrupt();
return JVMTI_ERROR_NONE;
}
@@ -1172,10 +1167,8 @@ _Jv_JVMTI_SetEventNotificationMode (jvmtiEnv *env, jvmtiEventMode mode,
if (event_thread != NULL)
{
- using namespace java::lang;
- Thread *t = reinterpret_cast<Thread *> (event_thread);
- THREAD_CHECK_VALID (t);
- THREAD_CHECK_IS_ALIVE (t);
+ THREAD_CHECK_VALID (event_thread);
+ THREAD_CHECK_IS_ALIVE (event_thread);
}
bool enabled;