src/os/aix/vm/os_aix.cpp
Print this page
*** 2810,2826 ****
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?
--- 2810,2819 ----
*** 3073,3083 ****
// 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();
}
// timeout, try to cancel the request
if (n >= RANDOMLY_LARGE_INTEGER) {
os::SuspendResume::State cancelled = osthread->sr.cancel_suspend();
--- 3066,3076 ----
// 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();
}
// timeout, try to cancel the request
if (n >= RANDOMLY_LARGE_INTEGER) {
os::SuspendResume::State cancelled = osthread->sr.cancel_suspend();
*** 3107,3117 ****
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();
}
}
} else {
ShouldNotReachHere();
}
--- 3100,3110 ----
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();
}
}
} else {
ShouldNotReachHere();
}