This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gui][patch] re-add accidentally removed sync
- From: graydon hoare <graydon at redhat dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 13 Jan 2005 21:38:52 -0500
- Subject: [gui][patch] re-add accidentally removed sync
hi,
this patch just fixes a mistake I made in the JNI optimization patch.
I've committed it to java-gui-branch.
-graydon
2005-01-13 Graydon Hoare <graydon@redhat.com>
* jni.cc (_Jv_JNI_RegisterNatives): Re-add sync, which was
accidentally removed in last change.
--- jni.cc 13 Jan 2005 05:20:50 -0000 1.81.2.2
+++ jni.cc 14 Jan 2005 02:36:25 -0000
@@ -1880,6 +1880,11 @@
const JNINativeMethod *methods,
jint nMethods)
{
+ // Synchronize while we do the work. This must match
+ // synchronization in some other functions that manipulate or use
+ // the nathash table.
+ JvSynchronize sync (global_ref_table);
+
// Look at each descriptor given us, and find the corresponding
// method in the class.
for (int j = 0; j < nMethods; ++j)