src/hotspot/share/prims/jni.cpp
changeset 59248 e92153ed8bdc
parent 59247 56bf71d64d51
child 59251 4cbfa5077d68
equal deleted inserted replaced
59247:56bf71d64d51 59248:e92153ed8bdc
  3687 void copy_jni_function_table(const struct JNINativeInterface_ *new_jni_NativeInterface) {
  3687 void copy_jni_function_table(const struct JNINativeInterface_ *new_jni_NativeInterface) {
  3688   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
  3688   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
  3689   intptr_t *a = (intptr_t *) jni_functions();
  3689   intptr_t *a = (intptr_t *) jni_functions();
  3690   intptr_t *b = (intptr_t *) new_jni_NativeInterface;
  3690   intptr_t *b = (intptr_t *) new_jni_NativeInterface;
  3691   for (uint i=0; i <  sizeof(struct JNINativeInterface_)/sizeof(void *); i++) {
  3691   for (uint i=0; i <  sizeof(struct JNINativeInterface_)/sizeof(void *); i++) {
  3692     Atomic::store(*b++, a++);
  3692     Atomic::store(a++, *b++);
  3693   }
  3693   }
  3694 }
  3694 }
  3695 
  3695 
  3696 void quicken_jni_functions() {
  3696 void quicken_jni_functions() {
  3697   // Replace Get<Primitive>Field with fast versions
  3697   // Replace Get<Primitive>Field with fast versions