summaryrefslogtreecommitdiff
path: root/libjava/jvmti.cc
diff options
context:
space:
mode:
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-29 17:43:34 +0000
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-29 17:43:34 +0000
commite27378f2ff576bc3cc09022e4bd13b72532e2188 (patch)
tree186cf38e0affab2bbcb19802d5501e67e12a76eb /libjava/jvmti.cc
parentc2bed4327c2dd27b87518532d417674d4edcc9c7 (diff)
downloadgcc-e27378f2ff576bc3cc09022e4bd13b72532e2188.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121296 138bc75d-0d04-0410-961f-82ee72b054a4
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 f7329841747..03eec74b4c1 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;