test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/ji05t001.c
changeset 50956 429b0997c16d
parent 50260 46c67f5e27c2
equal deleted inserted replaced
50955:1acfd2f56d72 50956:429b0997c16d
   331     checkIntercept(0, 0, 1); /* expected interceptions: 1 */
   331     checkIntercept(0, 0, 1); /* expected interceptions: 1 */
   332     /* check the current interception set in another JVMTI env */
   332     /* check the current interception set in another JVMTI env */
   333     checkIntercept(1, 0, 1); /* expected interceptions: 1 */
   333     checkIntercept(1, 0, 1); /* expected interceptions: 1 */
   334     NSK_DISPLAY0("\n<<< TEST CASE #4) done\n");
   334     NSK_DISPLAY0("\n<<< TEST CASE #4) done\n");
   335 
   335 
   336     NSK_DISPLAY1("\nagent A: returning exit code %d\n",
   336     NSK_DISPLAY1("\nagent A: detaching and returning exit code %d\n",
   337         exitCode);
   337         exitCode);
       
   338     if ((res = JNI_ENV_PTR(vm)->DetachCurrentThread(JNI_ENV_ARG1(vm))) != 0) {
       
   339         NSK_COMPLAIN1("TEST WARNING: agent A: DetachCurrentThread() returns: %d\n", res);
       
   340     }
   338     return exitCode;
   341     return exitCode;
   339 }
   342 }
   340 
   343 
   341 static int agentB(void *context) {
   344 static int agentB(void *context) {
   342     JNIEnv *env;
   345     JNIEnv *env;
   391     checkIntercept(1, 1, 1); /* expected interceptions: 1 */
   394     checkIntercept(1, 1, 1); /* expected interceptions: 1 */
   392     NSK_DISPLAY0("\n<<< TEST CASE #3) done\n");
   395     NSK_DISPLAY0("\n<<< TEST CASE #3) done\n");
   393 
   396 
   394     redir[1] = 1;
   397     redir[1] = 1;
   395 
   398 
   396     NSK_DISPLAY1("\nagent B: returning exit code %d\n",
   399     NSK_DISPLAY1("\nagent B: detaching and returning exit code %d\n",
   397         exitCode);
   400         exitCode);
       
   401     if ((res = JNI_ENV_PTR(vm)->DetachCurrentThread(JNI_ENV_ARG1(vm))) != 0) {
       
   402         NSK_COMPLAIN1("TEST WARNING: agent B: DetachCurrentThread() returns: %d\n", res);
       
   403     }
   398     return exitCode;
   404     return exitCode;
   399 }
   405 }
   400 /*********************/
   406 /*********************/
   401 
   407 
   402 /* callback functions */
   408 /* callback functions */