test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/setjniftab001.cpp
changeset 51870 cdfabab3413f
parent 51729 1ebe04845112
child 52495 52be2c714a2f
equal deleted inserted replaced
51869:f8f2f7ee52cb 51870:cdfabab3413f
   349        Note: the JNI spec says that the main thread can be detached from the VM
   349        Note: the JNI spec says that the main thread can be detached from the VM
   350        only since JDK 1.2 */
   350        only since JDK 1.2 */
   351     if (verbose)
   351     if (verbose)
   352         printf("\nb) Checking the assertion inside main thread detached and attached again ...\n\ndetaching the main thread ...\n");
   352         printf("\nb) Checking the assertion inside main thread detached and attached again ...\n\ndetaching the main thread ...\n");
   353 
   353 
   354     if ((res = vm->DetachCurrentThread()) != 0)
   354     if ((res = vm->DetachCurrentThread()) != 0) {
   355         printf("(%s,%d): Warning: DetachCurrentThread() returns: %d\n\
   355         printf(
   356 \tcheck with the detached main thread skipped\n",
   356             "(%s,%d): Warning: DetachCurrentThread() returns: %d\n"
       
   357             "\tcheck with the detached main thread skipped\n",
   357             __FILE__, __LINE__, res);
   358             __FILE__, __LINE__, res);
   358     else {
   359     } else {
   359         if (verbose)
   360         if (verbose)
   360             printf("\nattaching the main thread again ...\n");
   361             printf("\nattaching the main thread again ...\n");
   361         if ((res = vm->AttachCurrentThread((void **) &nextEnv, (void *) 0)) != 0) {
   362         if ((res = vm->AttachCurrentThread((void **) &nextEnv, (void *) 0)) != 0) {
   362             printf("(%s,%d): TEST FAILURE: waitingThread: AttachCurrentThread() returns: %d\n",
   363             printf("(%s,%d): TEST FAILURE: waitingThread: AttachCurrentThread() returns: %d\n",
   363                 __FILE__, __LINE__, res);
   364                 __FILE__, __LINE__, res);