jboolean rvmInitSignals(Env* env) { stackStateField = rvmGetInstanceField(env, java_lang_Throwable, "stackState", "J"); if (!stackStateField) return FALSE; if (sem_init(&dumpThreadStackTraceCallSemaphore, 0, 0) != 0) { return FALSE; } #if defined(DARWIN) registerDarwinExceptionHandler(); #endif return TRUE; }
jboolean rvmInitSignals(Env* env) { throwableInitMethod = rvmGetClassMethod(env, java_lang_Throwable, "init", "(Ljava/lang/Throwable;J)V"); if (!throwableInitMethod) return FALSE; if (sem_init(&dumpThreadStackTraceCallSemaphore, 0, 0) != 0) { return FALSE; } #if defined(DARWIN) registerDarwinExceptionHandler(); #endif return TRUE; }