< prev index next >
test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/ji06t001.cpp
Print this page
rev 52050 : [mq]: refactor
*** 79,96 ****
/* number of the redirected JNI function calls */
static volatile int monent_calls = 0;
static void lock() {
! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorEnter,
! jvmti, countLock)))
exit(STATUS_FAILED);
}
static void unlock() {
! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB2(RawMonitorExit,
! jvmti, countLock)))
exit(STATUS_FAILED);
}
/** redirected JNI functions **/
jint JNICALL MyMonitorEnter(JNIEnv *env, jobject obj) {
--- 79,94 ----
/* number of the redirected JNI function calls */
static volatile int monent_calls = 0;
static void lock() {
! if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorEnter(countLock)))
exit(STATUS_FAILED);
}
static void unlock() {
! if (!NSK_JVMTI_VERIFY(jvmti->RawMonitorExit(countLock)))
exit(STATUS_FAILED);
}
/** redirected JNI functions **/
jint JNICALL MyMonitorEnter(JNIEnv *env, jobject obj) {
*** 480,491 ****
nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
return JNI_ERR;
vm = jvm;
! if (!NSK_JVMTI_VERIFY(NSK_CPP_STUB3(CreateRawMonitor,
! jvmti, "_counter_lock", &countLock)))
return JNI_ERR;
return JNI_OK;
}
--- 478,488 ----
nsk_jvmti_createJVMTIEnv(jvm, reserved)) != NULL))
return JNI_ERR;
vm = jvm;
! if (!NSK_JVMTI_VERIFY(jvmti->CreateRawMonitor("_counter_lock", &countLock)))
return JNI_ERR;
return JNI_OK;
}
< prev index next >