natThread.cc (sleep): Turn 0 millis and 0 nanos into 1 nano.
* java/lang/natThread.cc (sleep): Turn 0 millis and 0 nanos into 1 nano. * include/quick-threads.h (_Jv_CondWait): Don't round to 0 inappropriately. From-SVN: r28742
This commit is contained in:
parent
1b12a13e40
commit
212f5d3026
3 changed files with 15 additions and 1 deletions
|
@ -214,6 +214,9 @@ java::lang::Thread::sleep (jlong millis, jint nanos)
|
|||
if (millis < 0 || nanos < 0 || nanos > 999999)
|
||||
_Jv_Throw (new IllegalArgumentException);
|
||||
|
||||
if (millis == 0 && nanos == 0)
|
||||
++nanos;
|
||||
|
||||
Thread *current = currentThread ();
|
||||
if (current->isInterrupted ())
|
||||
_Jv_Throw (new InterruptedException);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue