aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/time.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2006-09-25 23:33:04 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 08:49:07 -0700
commit4b84c69b5f6c08a540e3683f1360a6cdef2806c7 (patch)
tree708f1e4cbc2771886aaeb8eadb3ae4d458bc8133 /arch/um/os-Linux/time.c
parent[PATCH] uml: SIGIO cleanups (diff)
downloadlinux-dev-4b84c69b5f6c08a540e3683f1360a6cdef2806c7.tar.xz
linux-dev-4b84c69b5f6c08a540e3683f1360a6cdef2806c7.zip
[PATCH] uml: Move signal handlers to arch code
Have most signals go through an arch-provided handler which recovers the sigcontext and then calls a generic handler. This replaces the ARCH_GET_SIGCONTEXT macro, which was somewhat fragile. On x86_64, recovering %rdx (which holds the sigcontext pointer) must be the first thing that happens. sig_handler duly invokes that first, but there is no guarantee that I can see that instructions won't be reordered such that %rdx is used before that. Having the arch provide the handler seems much more robust. Some signals in some parts of UML require their own handlers - these places don't call set_handler any more. They call sigaction or signal themselves. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r--arch/um/os-Linux/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index 4ae73c0e5485..7f5ebbadca63 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -40,8 +40,8 @@ void disable_timer(void)
printk("disnable_timer - setitimer failed, errno = %d\n",
errno);
/* If there are signals already queued, after unblocking ignore them */
- set_handler(SIGALRM, SIG_IGN, 0, -1);
- set_handler(SIGVTALRM, SIG_IGN, 0, -1);
+ signal(SIGALRM, SIG_IGN);
+ signal(SIGVTALRM, SIG_IGN);
}
void switch_timers(int to_real)