Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
14290:d050fbf914d8 | 14291:5944dba4badc |
---|---|
3538 OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); | 3538 OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); |
3539 | 3539 |
3540 return os_sleep(millis, interruptible); | 3540 return os_sleep(millis, interruptible); |
3541 } | 3541 } |
3542 | 3542 |
3543 int os::naked_sleep() { | 3543 void os::naked_short_sleep(jlong ms) { |
3544 // %% make the sleep time an integer flag. for now use 1 millisec. | 3544 assert(ms < 1000, "Un-interruptable sleep, short time use only"); |
3545 return os_sleep(1, false); | 3545 |
3546 // usleep is deprecated and removed from POSIX, in favour of nanosleep, but | |
3547 // Solaris requires -lrt for this. | |
3548 usleep((ms * 1000)); | |
3549 | |
3550 return; | |
3546 } | 3551 } |
3547 | 3552 |
3548 // Sleep forever; naked call to OS-specific sleep; use with CAUTION | 3553 // Sleep forever; naked call to OS-specific sleep; use with CAUTION |
3549 void os::infinite_sleep() { | 3554 void os::infinite_sleep() { |
3550 while (true) { // sleep forever ... | 3555 while (true) { // sleep forever ... |