* posix-threads.cc (_Jv_CondWait): Fix currentTimeMillis() overflow.

From-SVN: r27524
This commit is contained in:
Bryce McKinlay 1999-06-14 17:20:35 +00:00 committed by Bryce McKinlay
parent 8576f0942e
commit 00af55a292
2 changed files with 11 additions and 7 deletions

View File

@ -1,8 +1,13 @@
1999-06-14 Bryce McKinlay <bryce@albatross.co.nz>
* posix-threads.cc (_Jv_CondWait): Fix currentTimeMillis() overflow.
1999-06-11 Warren Levy <warrenl@cygnus.com> 1999-06-11 Warren Levy <warrenl@cygnus.com>
* mauve-libgcj: Activated java.net Mauve tests. * mauve-libgcj: Activated java.net Mauve tests.
1999-06-10 Bryce McKinlay <bryce@albatross.co.nz> 1999-06-10 Bryce McKinlay <bryce@albatross.co.nz>
* java/net/natInetAddress.cc (aton): Fix typos. * java/net/natInetAddress.cc (aton): Fix typos.
(lookup): Use a bigger buffer size for gethostbyname_r on all (lookup): Use a bigger buffer size for gethostbyname_r on all
versions of glibc. Updated FIXME comment explaining this. versions of glibc. Updated FIXME comment explaining this.

View File

@ -86,10 +86,9 @@ _Jv_CondWait (_Jv_ConditionVariable_t *cv, _Jv_Mutex_t *mu,
else else
{ {
struct timespec ts; struct timespec ts;
unsigned long m = millis + java::lang::System::currentTimeMillis (); jlong m = millis + java::lang::System::currentTimeMillis ();
ts.tv_sec = m / 1000; ts.tv_sec = m / 1000;
ts.tv_nsec = (m % 1000) * 1000 * 1000 + nanos; ts.tv_nsec = ((m % 1000) * 1000000) + nanos;
r = pthread_cond_timedwait (cv, pmu, &ts); r = pthread_cond_timedwait (cv, pmu, &ts);
} }