This is not really java-linux specific, but this is the only java related group
that I am subscribed to.  I am wondering if a native method is specified as
synchronized if the jvm will perform the proper MontiorEnter & MonitorExit
calls or if I should call them in the native method.

So for example... does:

native public synchronized byte[] getBytes ();

imply:

JNIEXPORT jbyteArray JNICALL Java_<Package>_<Class>_getBytes
  (JNIEnv *env, jobject jthis)
{
        (*env)->MonitorEnter(env, jthis);
        /* do something */
        (*env)->MonitorExit(env, jthis);

        return /* some jbyteArray */;
}

--jason

Reply via email to