classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: awt - gtkpeers - threading


From: Joseph Wenninger
Subject: Re: awt - gtkpeers - threading
Date: Sun, 16 Nov 2003 20:49:56 +0000

Hi

Am Son, den 16.11.2003 schrieb Tom Tromey um 18:35:
....
> Joseph> 1) Why is there a field native_state in the GtkMainThread
> Joseph> accessed from native functions, but nowhere defined in the
> Joseph> class ?
> 
> Where do you see this?  I don't see a field named native_state
> anywhere.  There is "native_state_table", but it is just an ordinary C
> global, not a field.
> 

In the 0.06 classpath  I see
Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit (JNIEnv *env, jclass
clazz) -> 
MACRO:#define NSA_INIT(env, clazz) \
  native_state_table = init_state_table (env, clazz)
--->init_state_table_with_size (JNIEnv *env, jclass clazz, jint size)
{
...
  hash = (*env)->GetFieldID (env, clazz, "native_state", "I");

Could be that the problem is that we throw an exception, if a field
can't be found. Will look again in the jni documentation


....
> From your reference to green threads, I assume you want to use these
> AWT peers with the Sun JDK.  Note that the peer interface is not
> documented.  There's no guarantee our peers will work with Sun's
> implementation.

No. I have to do some developing practice during my studying and the
department at university I'm doing that, had developed an experimental
java jit/vm a long time ago. My job now is to port it to gnuclasspath.
it had it's own small class set before.
That thing doesn't use pthreads yet. It has it's own internal scheduler
and so on. My main problem is that once the gtk/g main loop has been
entered it doesn't return to the scheduler as long as the gtk main event
loop has been left, so it doesn't even finish the first show of a frame.

Kind regards
Joseph Wenninger





reply via email to

[Prev in Thread] Current Thread [Next in Thread]