This commit is contained in:
Coleen Phillimore 2014-07-14 10:15:21 -04:00
commit c9b2bc62c9
2991 changed files with 67823 additions and 46239 deletions

View file

@ -2809,12 +2809,10 @@ bool os::dont_yield() {
return DontYieldALot;
}
void os::yield() {
void os::naked_yield() {
sched_yield();
}
os::YieldResult os::NakedYield() { sched_yield(); return os::YIELD_UNKNOWN; }
////////////////////////////////////////////////////////////////////////////////
// thread priority support
@ -3071,7 +3069,7 @@ static bool do_suspend(OSThread* osthread) {
for (int n = 0; !osthread->sr.is_suspended(); n++) {
for (int i = 0; i < RANDOMLY_LARGE_INTEGER2 && !osthread->sr.is_suspended(); i++) {
os::yield();
os::naked_yield();
}
// timeout, try to cancel the request
@ -3105,7 +3103,7 @@ static void do_resume(OSThread* osthread) {
if (sr_notify(osthread) == 0) {
for (int n = 0; n < RANDOMLY_LARGE_INTEGER && !osthread->sr.is_running(); n++) {
for (int i = 0; i < 100 && !osthread->sr.is_running(); i++) {
os::yield();
os::naked_yield();
}
}
} else {