< prev index next >

src/java.base/macosx/native/libjli/java_md_macosx.m

Print this page
rev 56298 : 8231171: remove remaining sun.java.launcher.pid references


 740     pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 741 
 742     if (pthread_create(&tid, &attr, ThreadJavaMain, args) == 0) {
 743         void* tmp;
 744         pthread_join(tid, &tmp);
 745         rslt = (int)(intptr_t)tmp;
 746     } else {
 747        /*
 748         * Continue execution in current thread if for some reason (e.g. out of
 749         * memory/LWP)  a new thread can't be created. This will likely fail
 750         * later in JavaMain as JNI_CreateJavaVM needs to create quite a
 751         * few new threads, anyway, just give it a try..
 752         */
 753         rslt = JavaMain(args);
 754     }
 755 
 756     pthread_attr_destroy(&attr);
 757     return rslt;
 758 }
 759 
 760 void SetJavaLauncherPlatformProps() {
 761    /* Linux only */
 762 }
 763 
 764 static JavaVM* jvmInstance = NULL;
 765 static jboolean sameThread = JNI_FALSE; /* start VM in current thread */
 766 
 767 /*
 768  * Note there is a callback on this function from the splashscreen logic,
 769  * this as well SetJavaVMValue() needs to be simplified.
 770  */
 771 JNIEXPORT JavaVM* JNICALL
 772 JLI_GetJavaVMInstance()
 773 {
 774     return jvmInstance;
 775 }
 776 
 777 void
 778 RegisterThread()
 779 {
 780     // stubbed out for windows and *nixes.
 781 }
 782 
 783 static void




 740     pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threads
 741 
 742     if (pthread_create(&tid, &attr, ThreadJavaMain, args) == 0) {
 743         void* tmp;
 744         pthread_join(tid, &tmp);
 745         rslt = (int)(intptr_t)tmp;
 746     } else {
 747        /*
 748         * Continue execution in current thread if for some reason (e.g. out of
 749         * memory/LWP)  a new thread can't be created. This will likely fail
 750         * later in JavaMain as JNI_CreateJavaVM needs to create quite a
 751         * few new threads, anyway, just give it a try..
 752         */
 753         rslt = JavaMain(args);
 754     }
 755 
 756     pthread_attr_destroy(&attr);
 757     return rslt;
 758 }
 759 




 760 static JavaVM* jvmInstance = NULL;
 761 static jboolean sameThread = JNI_FALSE; /* start VM in current thread */
 762 
 763 /*
 764  * Note there is a callback on this function from the splashscreen logic,
 765  * this as well SetJavaVMValue() needs to be simplified.
 766  */
 767 JNIEXPORT JavaVM* JNICALL
 768 JLI_GetJavaVMInstance()
 769 {
 770     return jvmInstance;
 771 }
 772 
 773 void
 774 RegisterThread()
 775 {
 776     // stubbed out for windows and *nixes.
 777 }
 778 
 779 static void


< prev index next >