8028280: ParkEvent leak when running modified runThese which only loads classes

Use spin lock to manage ParkEvent and PlatformEvent free lists.

Reviewed-by: dholmes, fparain
This commit is contained in:
David Simms 2014-01-24 09:28:47 +01:00
parent 90a44b778d
commit edb5dd324e
7 changed files with 95 additions and 112 deletions

View file

@ -3486,6 +3486,16 @@ int os::sleep(Thread* thread, jlong ms, bool interruptable) {
return result;
}
//
// Short sleep, direct OS call.
//
// ms = 0, means allow others (if any) to run.
//
void os::naked_short_sleep(jlong ms) {
assert(ms < 1000, "Un-interruptable sleep, short time use only");
Sleep(ms);
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...