Mercurial > hg > truffle
diff src/os/solaris/vm/os_solaris.cpp @ 14291:5944dba4badc
8028280: ParkEvent leak when running modified runThese which only loads classes
Summary: Use spin lock to manage ParkEvent and PlatformEvent free lists.
Reviewed-by: dholmes, fparain
author | dsimms |
---|---|
date | Fri, 24 Jan 2014 09:28:47 +0100 |
parents | c250880a6673 |
children | b59507f713e0 7d28f4e15b61 |
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.cpp Thu Jan 23 16:02:14 2014 -0500 +++ b/src/os/solaris/vm/os_solaris.cpp Fri Jan 24 09:28:47 2014 +0100 @@ -3540,9 +3540,14 @@ 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