diff options
author | fitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-03 23:53:27 +0000 |
---|---|---|
committer | fitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-03 23:53:27 +0000 |
commit | 43efdf10a782c76515e45996fbaddf272af44bc2 (patch) | |
tree | a10fd01b9f72f7f247874cf6a02f8ec3e7752463 /libjava | |
parent | a2295b1c5cfa37ba98570b051e631dd799d3ffc3 (diff) | |
download | ppe42-gcc-43efdf10a782c76515e45996fbaddf272af44bc2.tar.gz ppe42-gcc-43efdf10a782c76515e45996fbaddf272af44bc2.zip |
2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com>
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c
(init_glib_threads): Check if threading system is already
initialized.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 7 | ||||
-rw-r--r-- | libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c | 18 |
2 files changed, 22 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 17a07fddfdd..298d2880267 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2005-05-03 Thomas Fitzsimmons <fitzsim@redhat.com> + + * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c + (init_glib_threads): Check if threading system is already + initialized. + 2005-05-03 Andrew Overholt <overholt@redhat.com> PR libgcj/21372: @@ -136,6 +142,7 @@ * gnu/java/net/protocol/file/Connection.java (lineSeparator): Initialize with SystemProperties.getProperty(). +>>>>>>> 1.3571 2005-04-27 Chris Burdess <dog@gnu.org> * gnu/java/net/protocol/file/Connection.java: Return correct content diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c index 8cb9e2f5d68..bb31233e35c 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c @@ -275,10 +275,22 @@ init_glib_threads(JNIEnv *env, jint portableNativeSync) } (*env)->GetJavaVM( env, &the_vm ); - if (portableNativeSync) - g_thread_init ( &portable_native_sync_jni_functions ); + if (!g_thread_supported ()) + { + if (portableNativeSync) + g_thread_init ( &portable_native_sync_jni_functions ); + else + g_thread_init ( NULL ); + } else - g_thread_init ( NULL ); + { + /* Warn if portable native sync is desired but the threading + system is already initialized. In that case we can't + override the threading implementation with our portable + native sync functions. */ + if (portableNativeSync) + g_printerr ("peer warning: portable native sync disabled.\n"); + } /* Debugging progress message; uncomment if needed: */ /* printf("called gthread init\n"); */ |