src/os/aix/vm/os_aix.cpp
Print this page
@@ -2810,17 +2810,10 @@
sched_yield();
}
os::YieldResult os::NakedYield() { sched_yield(); return os::YIELD_UNKNOWN; }
-void os::yield_all() {
- // Yields to all threads, including threads with lower priorities
- // Threads on Linux are all with same priority. The Solaris style
- // os::yield_all() with nanosleep(1ms) is not necessary.
- sched_yield();
-}
-
////////////////////////////////////////////////////////////////////////////////
// thread priority support
// From AIX manpage to pthread_setschedparam
// (see: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?
@@ -3073,11 +3066,11 @@
// managed to send the signal and switch to SUSPEND_REQUEST, now wait for SUSPENDED
for (int n = 0; !osthread->sr.is_suspended(); n++) {
for (int i = 0; i < RANDOMLY_LARGE_INTEGER2 && !osthread->sr.is_suspended(); i++) {
- os::yield_all();
+ os::yield();
}
// timeout, try to cancel the request
if (n >= RANDOMLY_LARGE_INTEGER) {
os::SuspendResume::State cancelled = osthread->sr.cancel_suspend();
@@ -3107,11 +3100,11 @@
while (!osthread->sr.is_running()) {
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_all();
+ os::yield();
}
}
} else {
ShouldNotReachHere();
}