mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8252406: Introduce Thread::as_Java_thread() convenience function
Reviewed-by: shade, coleenp, kbarrett, dcubed
This commit is contained in:
parent
488022689f
commit
976acddeb5
110 changed files with 360 additions and 456 deletions
|
@ -75,7 +75,7 @@ class ThreadStateTransition : public StackObj {
|
|||
public:
|
||||
ThreadStateTransition(JavaThread *thread) {
|
||||
_thread = thread;
|
||||
assert(thread != NULL && thread->is_Java_thread(), "must be Java thread");
|
||||
assert(thread != NULL, "must be active Java thread");
|
||||
}
|
||||
|
||||
// Change threadstate in a manner, so safepoint can detect changes.
|
||||
|
@ -186,7 +186,7 @@ class ThreadInVMfromUnknown {
|
|||
ThreadInVMfromUnknown() : _thread(NULL) {
|
||||
Thread* t = Thread::current();
|
||||
if (t->is_Java_thread()) {
|
||||
JavaThread* t2 = (JavaThread*) t;
|
||||
JavaThread* t2 = t->as_Java_thread();
|
||||
if (t2->thread_state() == _thread_in_native) {
|
||||
_thread = t2;
|
||||
ThreadStateTransition::transition_from_native(t2, _thread_in_vm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue