mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8143291: Remove redundant coding around os::exception_name
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
40f65439e2
commit
9e9eac05ae
14 changed files with 167 additions and 480 deletions
|
@ -4144,32 +4144,6 @@ void os::Solaris::install_signal_handlers() {
|
|||
void report_error(const char* file_name, int line_no, const char* title,
|
||||
const char* format, ...);
|
||||
|
||||
const char * signames[] = {
|
||||
"SIG0",
|
||||
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP",
|
||||
"SIGABRT", "SIGEMT", "SIGFPE", "SIGKILL", "SIGBUS",
|
||||
"SIGSEGV", "SIGSYS", "SIGPIPE", "SIGALRM", "SIGTERM",
|
||||
"SIGUSR1", "SIGUSR2", "SIGCLD", "SIGPWR", "SIGWINCH",
|
||||
"SIGURG", "SIGPOLL", "SIGSTOP", "SIGTSTP", "SIGCONT",
|
||||
"SIGTTIN", "SIGTTOU", "SIGVTALRM", "SIGPROF", "SIGXCPU",
|
||||
"SIGXFSZ", "SIGWAITING", "SIGLWP", "SIGFREEZE", "SIGTHAW",
|
||||
"SIGCANCEL", "SIGLOST"
|
||||
};
|
||||
|
||||
const char* os::exception_name(int exception_code, char* buf, size_t size) {
|
||||
if (0 < exception_code && exception_code <= SIGRTMAX) {
|
||||
// signal
|
||||
if (exception_code < sizeof(signames)/sizeof(const char*)) {
|
||||
jio_snprintf(buf, size, "%s", signames[exception_code]);
|
||||
} else {
|
||||
jio_snprintf(buf, size, "SIG%d", exception_code);
|
||||
}
|
||||
return buf;
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// (Static) wrapper for getisax(2) call.
|
||||
os::Solaris::getisax_func_t os::Solaris::_getisax = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue