aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorsten Glaser <tg@mirbsd.org>2012-05-27 17:16:48 +0000
committermaximilian attems <max@stro.at>2012-05-29 19:07:09 +0200
commit49419d2df2018fff5ae6250cf55b16fa65bdc490 (patch)
tree32bc3d07a844effe1f0f112b2664e04b6c7421e7
parent163920f31f98db13f4e37796bb92f0844e7aaf45 (diff)
downloadklibc-49419d2df2018fff5ae6250cf55b16fa65bdc490.tar.gz
[klibc] alpha: fix signal handler setup on DEC Alpha
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@mirbsd.org> [ Mark alpha as working. -maks ] Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/klibc/README.klibc2
-rw-r--r--usr/klibc/SYSCALLS.def3
-rw-r--r--usr/klibc/sigaction.c5
3 files changed, 8 insertions, 2 deletions
diff --git a/usr/klibc/README.klibc b/usr/klibc/README.klibc
index 283b9db60ff86..47618ec7c5c60 100644
--- a/usr/klibc/README.klibc
+++ b/usr/klibc/README.klibc
@@ -33,7 +33,7 @@ b) If you're cross-compiling, you need to set KLIBCARCH to the
The following is the last known status of various architectures:
- alpha: Runtime breakage
+ alpha: Working
arm-thumb: Untested
arm: Working
arm26: Not yet ported
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 0463df8481a69..9b07aa215c656 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 658c3ad5854d1..19a8a54b8f3ef 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