Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalRuntime.cpp @ 7220:fcae6d960acd
added more compiler intrinsics
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Tue, 11 Dec 2012 08:28:00 +0100 |
parents | 5a95c784febf |
children | 2ae3e26b7e9a |
line wrap: on
line diff
--- a/src/share/vm/graal/graalRuntime.cpp Thu Dec 06 13:53:36 2012 +0100 +++ b/src/share/vm/graal/graalRuntime.cpp Tue Dec 11 08:28:00 2012 +0100 @@ -595,6 +595,23 @@ } JRT_END +JRT_ENTRY(jint, GraalRuntime::graal_identity_hash_code(JavaThread* thread, oop obj)) + return (jint) obj->identity_hash(); +JRT_END + +JRT_ENTRY(jboolean, GraalRuntime::graal_thread_is_interrupted(JavaThread* thread, oop receiver, jboolean clear_interrupted)) + // TEMP: + tty->print_cr("ThreadIsInterruptedSlowCase"); + + // Ensure that the C++ Thread and OSThread structures aren't freed before we operate + Handle receiverHandle(thread, receiver); + JRT_BLOCK + MutexLockerEx ml(thread->threadObj() == receiver ? NULL : Threads_lock); + JavaThread* receiverThread = java_lang_Thread::thread(receiverHandle()); + return (jint) Thread::is_interrupted(receiverThread, clear_interrupted != 0); + JRT_BLOCK_END +JRT_END + // JVM_InitializeGraalRuntime JVM_ENTRY(jobject, JVM_InitializeGraalRuntime(JNIEnv *env, jclass graalclass)) return VMToCompiler::graalRuntimePermObject();