Mercurial > hg > truffle
comparison src/share/vm/graal/graalRuntime.cpp @ 21207:93dc70e47fb0
documented why THREAD_IS_INTERRUPTED foreign call is NOT_LEAF
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 04 May 2015 11:20:39 +0200 |
parents | 85b0935625c1 |
children | 923c37b10fb4 1ab7802d35c9 |
comparison
equal
deleted
inserted
replaced
21206:e37701872767 | 21207:93dc70e47fb0 |
---|---|
598 JRT_ENTRY(jint, GraalRuntime::identity_hash_code(JavaThread* thread, oopDesc* obj)) | 598 JRT_ENTRY(jint, GraalRuntime::identity_hash_code(JavaThread* thread, oopDesc* obj)) |
599 return (jint) obj->identity_hash(); | 599 return (jint) obj->identity_hash(); |
600 JRT_END | 600 JRT_END |
601 | 601 |
602 JRT_ENTRY(jboolean, GraalRuntime::thread_is_interrupted(JavaThread* thread, oopDesc* receiver, jboolean clear_interrupted)) | 602 JRT_ENTRY(jboolean, GraalRuntime::thread_is_interrupted(JavaThread* thread, oopDesc* receiver, jboolean clear_interrupted)) |
603 // Ensure that the C++ Thread and OSThread structures aren't freed before we operate | 603 // Ensure that the C++ Thread and OSThread structures aren't freed before we operate. |
604 // This locking requires thread_in_vm which is why this method cannot be JRT_LEAF. | |
604 Handle receiverHandle(thread, receiver); | 605 Handle receiverHandle(thread, receiver); |
605 MutexLockerEx ml(thread->threadObj() == (void*)receiver ? NULL : Threads_lock); | 606 MutexLockerEx ml(thread->threadObj() == (void*)receiver ? NULL : Threads_lock); |
606 JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle()); | 607 JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle()); |
607 if (receiverThread == NULL) { | 608 if (receiverThread == NULL) { |
608 // The other thread may exit during this process, which is ok so return false. | 609 // The other thread may exit during this process, which is ok so return false. |