Thread.sleep() and System.nanoTime() fixes
Andreas Schwab
schwab@suse.de
Thu Sep 14 09:57:00 GMT 2006
Andreas Schwab <schwab@suse.de> writes:
> gkeating@apple.com (Geoffrey Keating) writes:
>
>> 2006-09-13 Geoffrey Keating <geoffk@apple.com>
>>
>> * posix.cc (_Jv_platform_nanotime): Return nanoseconds, not
>> microseconds; use gettimeofday when available.
>> * posix-threads.cc (_Jv_CondWait): Improve accuracy and range of
>> timeout calculation.
>> * testsuite/libjava.lang/Thread_Sleep_2.java: New.
>> * testsuite/libjava.lang/Thread_Sleep_2.out: New.
>
> ../../../libjava/posix-threads.cc: In function 'int _Jv_CondWait(_Jv_ConditionVariable_t*, _Jv_Mutex_t*, jlong, jint)':
> ../../../libjava/posix-threads.cc:106: error: 'gettimeofday' was not declared in this scope
> make[3]: *** [posix-threads.lo] Error 1
I've checked this in as obvious, tested on ia64-suse-linux.
Andreas.
2006-09-14 Andreas Schwab <schwab@suse.de>
* posix-threads.cc: Include "posix.h".
Index: libjava/posix-threads.cc
===================================================================
--- libjava/posix-threads.cc (revision 116942)
+++ libjava/posix-threads.cc (revision 116943)
@@ -13,6 +13,8 @@ details. */
#include <config.h>
+#include "posix.h"
+
// If we're using the Boehm GC, then we need to override some of the
// thread primitives. This is fairly gross.
#ifdef HAVE_BOEHM_GC
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Gcc-patches
mailing list