[klibc] [PATCH] fix signal handler setup on DEC Alpha
Thorsten Glaser
tg at mirbsd.org
Sun May 27 10:16:48 PDT 2012
we need a five-argument rt_sigaction syscall form with a hidden
argument but that can be NULL as the kernel sets it up for us
better than we can (easily) do, at speed cost
Signed-off-by: Thorsten Glaser <tg at mirbsd.org>
---
usr/klibc/SYSCALLS.def | 3 ++-
usr/klibc/sigaction.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 0463df8..9b07aa2 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -202,8 +202,9 @@ ssize_t sendfile64,sendfile::sendfile(int, int, off_t *, size_t, off_t);
* sanitizing <signal.h> for all architectures, sigh. See <klibc/config.h>.
*/
#if _KLIBC_USE_RT_SIG
-<!sparc,sparc64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t);
+<!sparc,sparc64,alpha> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t);
<sparc,sparc64> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, void *, size_t);
+<alpha> int rt_sigaction::__rt_sigaction(int, const struct sigaction *, struct sigaction *, size_t, void *);
int rt_sigsuspend::__rt_sigsuspend(const sigset_t *, size_t);
int rt_sigpending::__rt_sigpending(sigset_t *, size_t);
int rt_sigprocmask::__rt_sigprocmask(int, const sigset_t *, sigset_t *, size_t);
diff --git a/usr/klibc/sigaction.c b/usr/klibc/sigaction.c
index 658c3ad..19a8a54 100644
--- a/usr/klibc/sigaction.c
+++ b/usr/klibc/sigaction.c
@@ -11,6 +11,9 @@ __extern int __sigaction(int, const struct sigaction *, struct sigaction *);
#ifdef __sparc__
__extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *,
void (*)(void), size_t);
+#elif defined(__alpha__)
+__extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *,
+ size_t, void *);
#else
__extern int __rt_sigaction(int, const struct sigaction *, struct sigaction *,
size_t);
@@ -43,6 +46,8 @@ int sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
: NULL;
rv = __rt_sigaction(sig, act, oact, restorer, sizeof(sigset_t));
}
+# elif defined(__alpha__)
+ rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t), NULL);
# else
rv = __rt_sigaction(sig, act, oact, sizeof(sigset_t));
# endif
--
1.7.10
More information about the klibc
mailing list