mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
Merge
This commit is contained in:
commit
c9b2bc62c9
2991 changed files with 67823 additions and 46239 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue