This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Thread.sleep, System.currentTimeMillis() on MPC823


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]