diff --git a/src/hotspot/os/aix/os_aix.cpp b/src/hotspot/os/aix/os_aix.cpp index 71a9aa576ea..1925357e1b4 100644 --- a/src/hotspot/os/aix/os_aix.cpp +++ b/src/hotspot/os/aix/os_aix.cpp @@ -2059,15 +2059,6 @@ size_t os::vm_min_address() { return _vm_min_address_default; } -// Used to convert frequent JVM_Yield() to nops -bool os::dont_yield() { - return DontYieldALot; -} - -void os::naked_yield() { - sched_yield(); -} - //////////////////////////////////////////////////////////////////////////////// // thread priority support diff --git a/src/hotspot/os/bsd/os_bsd.cpp b/src/hotspot/os/bsd/os_bsd.cpp index ca4a77d2b4a..17b52bc1efa 100644 --- a/src/hotspot/os/bsd/os_bsd.cpp +++ b/src/hotspot/os/bsd/os_bsd.cpp @@ -1936,15 +1936,6 @@ size_t os::vm_min_address() { #endif } -// Used to convert frequent JVM_Yield() to nops -bool os::dont_yield() { - return DontYieldALot; -} - -void os::naked_yield() { - sched_yield(); -} - //////////////////////////////////////////////////////////////////////////////// // thread priority support diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp index 24e80accfde..3180dddfe50 100644 --- a/src/hotspot/os/linux/os_linux.cpp +++ b/src/hotspot/os/linux/os_linux.cpp @@ -4310,25 +4310,6 @@ size_t os::vm_min_address() { return value; } -// Used to convert frequent JVM_Yield() to nops -bool os::dont_yield() { - return DontYieldALot; -} - -// Linux CFS scheduler (since 2.6.23) does not guarantee sched_yield(2) will -// actually give up the CPU. Since skip buddy (v2.6.28): -// -// * Sets the yielding task as skip buddy for current CPU's run queue. -// * Picks next from run queue, if empty, picks a skip buddy (can be the yielding task). -// * Clears skip buddies for this run queue (yielding task no longer a skip buddy). -// -// An alternative is calling os::naked_short_nanosleep with a small number to avoid -// getting re-scheduled immediately. -// -void os::naked_yield() { - sched_yield(); -} - //////////////////////////////////////////////////////////////////////////////// // thread priority support diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp index 76a6080305b..a18a633002c 100644 --- a/src/hotspot/os/posix/os_posix.cpp +++ b/src/hotspot/os/posix/os_posix.cpp @@ -854,6 +854,14 @@ void os::_exit(int num) { ALLOW_C_FUNCTION(::_exit, ::_exit(num);) } +bool os::dont_yield() { + return DontYieldALot; +} + +void os::naked_yield() { + sched_yield(); +} + // Builds a platform dependent Agent_OnLoad_<lib_name> function name // which is used to find statically linked in agents. // Parameters: