diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-09-20 21:58:36 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-09-20 21:58:36 +0200 |
commit | aea5c83461dac53b8619b7bf2ef1fb348ecb4ef1 (patch) | |
tree | e75cd37d8489e437f995df9a2a57e87826c95fe1 /hurd/exc2signal.c | |
parent | 2c46d1148650edf5d02051c3794227d52618db0c (diff) | |
download | glibc-aea5c83461dac53b8619b7bf2ef1fb348ecb4ef1.tar.gz glibc-aea5c83461dac53b8619b7bf2ef1fb348ecb4ef1.tar.xz glibc-aea5c83461dac53b8619b7bf2ef1fb348ecb4ef1.zip |
Fix exc2signal.c template
As a follow-up to 0e3426bbcf2ff61d06d580fc9362fde79953a281 * hurd/exc2signal.c: #include <hurd/signal.h> (_hurd_exception2signal): Replace 'exception', 'code', 'subcode', 'sigcode', 'error' parameters with 'detail' parameter. Fix code accordingly.
Diffstat (limited to 'hurd/exc2signal.c')
-rw-r--r-- | hurd/exc2signal.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/hurd/exc2signal.c b/hurd/exc2signal.c index 3a2ec08124..2527d83bf1 100644 --- a/hurd/exc2signal.c +++ b/hurd/exc2signal.c @@ -17,6 +17,7 @@ <http://www.gnu.org/licenses/>. */ #include <hurd.h> +#include <hurd/signal.h> /* This file must be modified with machine-dependent details. */ #error "need to write sysdeps/mach/hurd/MACHINE/exc2signal.c" @@ -25,46 +26,45 @@ into a signal number and signal subcode. */ void -_hurd_exception2signal (int exception, int code, int subcode, - int *signo, int *sigcode, int *error) +_hurd_exception2signal (struct hurd_signal_detail *detail, int *signo) { - *error = 0; + detail->error = 0; - switch (exception) + switch (detail->exc) { default: *signo = SIGIOT; - *sigcode = exception; + detail->code = detail->exc; break; case EXC_BAD_ACCESS: - if (code == KERN_PROTECTION_FAILURE) + if (detail->exc_code == KERN_PROTECTION_FAILURE) *signo = SIGSEGV; else *signo = SIGBUS; - *sigcode = subcode; - *error = code; + detail->code = detail->exc_subcode; + detail->error = detail->exc_code; break; case EXC_BAD_INSTRUCTION: *signo = SIGILL; - *sigcode = 0; + detail->code = 0; break; case EXC_ARITHMETIC: *signo = SIGFPE; - *sigcode = 0; + detail->code = 0; break; case EXC_EMULATION: case EXC_SOFTWARE: *signo = SIGEMT; - *sigcode = 0; + detail->code = 0; break; case EXC_BREAKPOINT: *signo = SIGTRAP; - *sigcode = 0; + detail->code = 0; break; } } |