src/os/aix/vm/os_aix.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 2014 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
@@ -2827,22 +2827,17 @@
sched_yield();
}
os::YieldResult os::NakedYield() { sched_yield(); return os::YIELD_UNKNOWN; }
-void os::yield_all(int attempts) {
+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();
}
-// Called from the tight loops to possibly influence time-sharing heuristics
-void os::loop_breaker(int attempts) {
- os::yield_all(attempts);
-}
-
////////////////////////////////////////////////////////////////////////////////
// thread priority support
// From AIX manpage to pthread_setschedparam
// (see: http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?
@@ -3095,11 +3090,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(i);
+ os::yield_all();
}
// timeout, try to cancel the request
if (n >= RANDOMLY_LARGE_INTEGER) {
os::SuspendResume::State cancelled = osthread->sr.cancel_suspend();
@@ -3129,11 +3124,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(i);
+ os::yield_all();
}
}
} else {
ShouldNotReachHere();
}