8289147: unify os::infinite_sleep on posix platforms

Reviewed-by: mdoerr, kbarrett, dholmes
This commit is contained in:
Matthias Baesken 2022-06-27 06:50:11 +00:00
parent de7467146f
commit 62e1e7950b
4 changed files with 6 additions and 21 deletions

View File

@ -2138,13 +2138,6 @@ char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, bool
return addr;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...
::sleep(100); // ... 100 seconds at a time
}
}
// Used to convert frequent JVM_Yield() to nops
bool os::dont_yield() {
return DontYieldALot;

View File

@ -1788,13 +1788,6 @@ char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, bool
return NULL;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...
::sleep(100); // ... 100 seconds at a time
}
}
// Used to convert frequent JVM_Yield() to nops
bool os::dont_yield() {
return DontYieldALot;

View File

@ -4166,13 +4166,6 @@ char* os::pd_attempt_reserve_memory_at(char* requested_addr, size_t bytes, bool
return NULL;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...
::sleep(100); // ... 100 seconds at a time
}
}
// Used to convert frequent JVM_Yield() to nops
bool os::dont_yield() {
return DontYieldALot;

View File

@ -854,6 +854,12 @@ char* os::build_agent_function_name(const char *sym_name, const char *lib_name,
return agent_entry_name;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...
::sleep(100); // ... 100 seconds at a time
}
}
void os::naked_short_nanosleep(jlong ns) {
struct timespec req;