CNI changes (Was: Binary Compatibility)
Tom Tromey
tromey@redhat.com
Mon Aug 4 17:17:00 GMT 2003
Andrew> Besides, I have some vague memory that Java semantics actually
Andrew> require storing into an int field to be atomic. [Looks it
Andrew> up.] Oh yes, according to Section 8.3 of the VMspec that
Andrew> seems to be the case. But a method pointer might on some
Andrew> machines be a long rather than an int, so synchronization may
Andrew> be required. I get it now, I think.
I've never even been certain that we correctly implement the java
rules for atomicity of stores. These rules are a requirement on us to
generate the correct code...
Changing the lookup code will make things a little worse. We'll need
an extra function call and a synchronization for every JNI method. It
would be nice not to do this if possible. This is an area I really
don't know much about. Can we tell gcc that we need a certain store
to be atomic?
Tom
More information about the Java
mailing list