1 //===-- Map of POSIX signal numbers to strings ------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_POSIX_SIGNALS_H 10 #define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_POSIX_SIGNALS_H 11 12 #include "src/__support/CPP/array.h" 13 #include "src/__support/StringUtil/message_mapper.h" 14 #include "src/__support/macros/config.h" 15 16 #include <signal.h> // For signal numbers 17 18 namespace LIBC_NAMESPACE_DECL { 19 20 LIBC_INLINE_VAR constexpr MsgTable<22> POSIX_SIGNALS = { 21 MsgMapping(SIGHUP, "Hangup"), 22 MsgMapping(SIGQUIT, "Quit"), 23 MsgMapping(SIGTRAP, "Trace/breakpoint trap"), 24 MsgMapping(SIGBUS, "Bus error"), 25 MsgMapping(SIGKILL, "Killed"), 26 MsgMapping(SIGUSR1, "User defined signal 1"), 27 MsgMapping(SIGUSR2, "User defined signal 2"), 28 MsgMapping(SIGPIPE, "Broken pipe"), 29 MsgMapping(SIGALRM, "Alarm clock"), 30 MsgMapping(SIGCHLD, "Child exited"), 31 MsgMapping(SIGCONT, "Continued"), 32 MsgMapping(SIGSTOP, "Stopped (signal)"), 33 MsgMapping(SIGTSTP, "Stopped"), 34 MsgMapping(SIGTTIN, "Stopped (tty input)"), 35 MsgMapping(SIGTTOU, "Stopped (tty output)"), 36 MsgMapping(SIGURG, "Urgent I/O condition"), 37 MsgMapping(SIGXCPU, "CPU time limit exceeded"), 38 MsgMapping(SIGXFSZ, "File size limit exceeded"), 39 MsgMapping(SIGVTALRM, "Virtual timer expired"), 40 MsgMapping(SIGPROF, "Profiling timer expired"), 41 MsgMapping(SIGPOLL, "I/O possible"), 42 MsgMapping(SIGSYS, "Bad system call"), 43 }; 44 45 } // namespace LIBC_NAMESPACE_DECL 46 47 #endif // LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_POSIX_SIGNALS_H 48