8331031: unify os::dont_yield and os::naked_yield across Posix platforms
Reviewed-by: coleenp, mdoerr
This commit is contained in:
parent
8031dabf83
commit
c9442014e5
src/hotspot/os
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user