comparison src/hotspot/os/solaris/os_solaris.cpp @ 49568:a0f22265e29c

8200298: Unify all unix versions of libjsig/jsig.c Reviewed-by: dholmes, stuefe
author ihse
date Tue, 10 Apr 2018 19:46:02 +0200
parents ef5d5d343e2a
children 9806f23d5e5e
comparison
equal deleted inserted replaced
9:373bcbe6dcb8 10:9865c9f2382f
2099 static int Sigexit = 0; 2099 static int Sigexit = 0;
2100 static jint *pending_signals = NULL; 2100 static jint *pending_signals = NULL;
2101 static int *preinstalled_sigs = NULL; 2101 static int *preinstalled_sigs = NULL;
2102 static struct sigaction *chainedsigactions = NULL; 2102 static struct sigaction *chainedsigactions = NULL;
2103 static Semaphore* sig_sem = NULL; 2103 static Semaphore* sig_sem = NULL;
2104 typedef int (*version_getting_t)();
2105 version_getting_t os::Solaris::get_libjsig_version = NULL;
2106 2104
2107 int os::sigexitnum_pd() { 2105 int os::sigexitnum_pd() {
2108 assert(Sigexit > 0, "signal memory not yet initialized"); 2106 assert(Sigexit > 0, "signal memory not yet initialized");
2109 return Sigexit; 2107 return Sigexit;
2110 } 2108 }
3966 if (begin_signal_setting != NULL) { 3964 if (begin_signal_setting != NULL) {
3967 end_signal_setting = CAST_TO_FN_PTR(signal_setting_t, 3965 end_signal_setting = CAST_TO_FN_PTR(signal_setting_t,
3968 dlsym(RTLD_DEFAULT, "JVM_end_signal_setting")); 3966 dlsym(RTLD_DEFAULT, "JVM_end_signal_setting"));
3969 get_signal_action = CAST_TO_FN_PTR(get_signal_t, 3967 get_signal_action = CAST_TO_FN_PTR(get_signal_t,
3970 dlsym(RTLD_DEFAULT, "JVM_get_signal_action")); 3968 dlsym(RTLD_DEFAULT, "JVM_get_signal_action"));
3971 get_libjsig_version = CAST_TO_FN_PTR(version_getting_t,
3972 dlsym(RTLD_DEFAULT, "JVM_get_libjsig_version"));
3973 libjsig_is_loaded = true; 3969 libjsig_is_loaded = true;
3974 if (os::Solaris::get_libjsig_version != NULL) {
3975 int libjsigversion = (*os::Solaris::get_libjsig_version)();
3976 assert(libjsigversion == JSIG_VERSION_1_4_1, "libjsig version mismatch");
3977 }
3978 assert(UseSignalChaining, "should enable signal-chaining"); 3970 assert(UseSignalChaining, "should enable signal-chaining");
3979 } 3971 }
3980 if (libjsig_is_loaded) { 3972 if (libjsig_is_loaded) {
3981 // Tell libjsig jvm is setting signal handlers 3973 // Tell libjsig jvm is setting signal handlers
3982 (*begin_signal_setting)(); 3974 (*begin_signal_setting)();