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

@ -3516,19 +3516,16 @@ void os::infinite_sleep() {
typedef BOOL (WINAPI * STTSignature)(void);
os::YieldResult os::NakedYield() {
void os::naked_yield() {
// Use either SwitchToThread() or Sleep(0)
// Consider passing back the return value from SwitchToThread().
if (os::Kernel32Dll::SwitchToThreadAvailable()) {
return SwitchToThread() ? os::YIELD_SWITCHED : os::YIELD_NONEREADY;
SwitchToThread();
} else {
Sleep(0);
}
return os::YIELD_UNKNOWN;
}
void os::yield() { os::NakedYield(); }
// Win32 only gives you access to seven real priorities at a time,
// so we compress Java's ten down to seven. It would be better
// if we dynamically adjusted relative priorities.
@ -4877,8 +4874,7 @@ void os::PlatformEvent::unpark() {
// 1 :=> 1
// -1 :=> either 0 or 1; must signal target thread
// That is, we can safely transition _Event from -1 to either
// 0 or 1. Forcing 1 is slightly more efficient for back-to-back
// unpark() calls.
// 0 or 1.
// See also: "Semaphores in Plan 9" by Mullender & Cox
//
// Note: Forcing a transition from "-1" to "1" on an unpark() means