mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
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:
parent
90a44b778d
commit
edb5dd324e
7 changed files with 95 additions and 112 deletions
|
@ -3540,9 +3540,14 @@ int os::sleep(Thread* thread, jlong millis, bool interruptible) {
|
|||
return os_sleep(millis, interruptible);
|
||||
}
|
||||
|
||||
int os::naked_sleep() {
|
||||
// %% make the sleep time an integer flag. for now use 1 millisec.
|
||||
return os_sleep(1, false);
|
||||
void os::naked_short_sleep(jlong ms) {
|
||||
assert(ms < 1000, "Un-interruptable sleep, short time use only");
|
||||
|
||||
// usleep is deprecated and removed from POSIX, in favour of nanosleep, but
|
||||
// Solaris requires -lrt for this.
|
||||
usleep((ms * 1000));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue