This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Thread.sleep, System.currentTimeMillis() on MPC823
- To: sascha dot jaeckle at ntb dot ch (Jaeckle Sascha)
- Subject: Re: Thread.sleep, System.currentTimeMillis() on MPC823
- From: Tom Tromey <tromey at redhat dot com>
- Date: 05 Nov 2001 14:34:24 -0700
- Cc: java at gcc dot gnu dot org
- References: <3BE6F842.4080809@ntb.ch>
- Reply-To: tromey at redhat dot com
>>>>> "Jaeckle" == Jaeckle Sascha <sascha.jaeckle@ntb.ch> writes:
Jaeckle> I'm trying to use Thread.sleep(1000) in my Java-Programm. It
Jaeckle> didn't work so I tried with System.currentTimeMillis() to
Jaeckle> wait some time. Both sleep an currentTimeMillis do not work
Jaeckle> on my MPC823 with the following actual gcj:
Thread.sleep() is implemented using the low-level thread primitives.
You didn't enable any thread package when you configured libgcj.
Ordinarily the threadless configuration will correctly sleep, at least
on Unix hosts. configure will look for sleep() and use it if it is
found. However you appear to have built a cross-compiler. In this
case libgcj's configure simply assumes that sleep() is not found.
If you are trying to do a native Linux build, change your configure
invocation by removing the --target and adding --enable-threads=posix.
If you are trying to target some random embedded system, you'll have
to figure out how to make it do what you want. If your OS has sleep()
you can probably easily hack configure.in. If your OS is not POSIX-y,
then you can do a low-level libgcj port.
If you are trying to do a "host-x-host" build (build a compiler for
Linux architecture X on Linux architecture Y), then I don't know
exactly what you have to do. It can be done, in theory. But I've
never done it.
Tom