mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8047714: Fix for JDK-6546236 made Solaris os::yield() a no-op
Reviewed-by: hseigel, lfoltan
This commit is contained in:
parent
4f7e4160a0
commit
5a8cc5f33d
15 changed files with 23 additions and 47 deletions
|
@ -3042,7 +3042,7 @@ JVM_ENTRY(void, JVM_Yield(JNIEnv *env, jclass threadClass))
|
|||
if (ConvertYieldToSleep) {
|
||||
os::sleep(thread, MinSleepInterval, false);
|
||||
} else {
|
||||
os::yield();
|
||||
os::naked_yield();
|
||||
}
|
||||
JVM_END
|
||||
|
||||
|
@ -3072,7 +3072,7 @@ JVM_ENTRY(void, JVM_Sleep(JNIEnv* env, jclass threadClass, jlong millis))
|
|||
// It appears that in certain GUI contexts, it may be beneficial to do a short sleep
|
||||
// for SOLARIS
|
||||
if (ConvertSleepToYield) {
|
||||
os::yield();
|
||||
os::naked_yield();
|
||||
} else {
|
||||
ThreadState old_state = thread->osthread()->get_state();
|
||||
thread->osthread()->set_state(SLEEPING);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue