-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel+userland(lib): refactor errno and signal list
- Loading branch information
Showing
5 changed files
with
52 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,39 @@ | ||
#pragma once | ||
|
||
enum { | ||
SIGHUP = 1, | ||
SIGINT, | ||
SIGQUIT, | ||
SIGILL, | ||
SIGTRAP, | ||
SIGABRT, | ||
SIGBUS, | ||
SIGFPE, | ||
SIGKILL, | ||
SIGUSR1, | ||
SIGSEGV, | ||
SIGUSR2, | ||
SIGPIPE, | ||
SIGALRM, | ||
SIGTERM, | ||
SIGSTKFLT, | ||
SIGCHLD, | ||
SIGCONT, | ||
SIGSTOP, | ||
SIGTSTP, | ||
SIGTTIN, | ||
SIGTTOU, | ||
SIGURG, | ||
SIGXCPU, | ||
SIGXFSZ, | ||
SIGVTALRM, | ||
SIGPROF, | ||
SIGWINCH, | ||
SIGIO, | ||
SIGPWR, | ||
SIGSYS, | ||
NSIG | ||
}; | ||
#define ENUMERATE_SIGNALS(F) \ | ||
F(SIGINVALID, "Invalid signal") \ | ||
F(SIGHUP, "Hangup") \ | ||
F(SIGINT, "Interrupt") \ | ||
F(SIGQUIT, "Quit") \ | ||
F(SIGILL, "Illegal instruction") \ | ||
F(SIGTRAP, "Trace/breakpoint trap") \ | ||
F(SIGABRT, "Aborted") \ | ||
F(SIGBUS, "Bus error") \ | ||
F(SIGFPE, "Floating point exception") \ | ||
F(SIGKILL, "Killed") \ | ||
F(SIGUSR1, "User defined signal 1") \ | ||
F(SIGSEGV, "Segmentation violation") \ | ||
F(SIGUSR2, "User defined signal 2") \ | ||
F(SIGPIPE, "Broken pipe") \ | ||
F(SIGALRM, "Alarm clock") \ | ||
F(SIGTERM, "Terminated") \ | ||
F(SIGSTKFLT, "Stack fault") \ | ||
F(SIGCHLD, "Child exited") \ | ||
F(SIGCONT, "Continued") \ | ||
F(SIGSTOP, "Stopped (signal)") \ | ||
F(SIGTSTP, "Stopped") \ | ||
F(SIGTTIN, "Stopped (tty input)") \ | ||
F(SIGTTOU, "Stopped (tty output)") \ | ||
F(SIGURG, "Urgent I/O condition") \ | ||
F(SIGXCPU, "CPU time limit exceeded") \ | ||
F(SIGXFSZ, "File size limit exceeded") \ | ||
F(SIGVTALRM, "Virtual timer expired") \ | ||
F(SIGPROF, "Profiling timer expired") \ | ||
F(SIGWINCH, "Window changed") \ | ||
F(SIGIO, "I/O possible") \ | ||
F(SIGPWR, "Power failure") \ | ||
F(SIGSYS, "Bad system call") | ||
|
||
#define ENUM_ITEM(I, MSG) I, | ||
enum { ENUMERATE_SIGNALS(ENUM_ITEM) NSIG }; | ||
#undef ENUM_ITEM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters