diff options
| author | John W. Linville <linville@tuxdriver.com> | 2012-09-07 15:07:55 -0400 | 
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2012-09-07 15:07:55 -0400 | 
| commit | fac805f8c198092de9a2842efd7f5022e2937b18 (patch) | |
| tree | 7557809c373f97a343c427d8fded0696060394ce /arch/um/os-Linux/signal.c | |
| parent | 2461c7d60f9f3821274e4acf9019cba8b82c94b5 (diff) | |
| parent | f10723841e624c0726c70356b31d91befed01dd6 (diff) | |
| download | olio-linux-3.10-fac805f8c198092de9a2842efd7f5022e2937b18.tar.xz olio-linux-3.10-fac805f8c198092de9a2842efd7f5022e2937b18.zip  | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'arch/um/os-Linux/signal.c')
| -rw-r--r-- | arch/um/os-Linux/signal.c | 26 | 
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index 2d22f1fcd8e..6366ce904b9 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c @@ -13,8 +13,9 @@  #include "kern_util.h"  #include "os.h"  #include "sysdep/mcontext.h" +#include "internal.h" -void (*sig_info[NSIG])(int, struct uml_pt_regs *) = { +void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *) = {  	[SIGTRAP]	= relay_signal,  	[SIGFPE]	= relay_signal,  	[SIGILL]	= relay_signal, @@ -24,7 +25,7 @@ void (*sig_info[NSIG])(int, struct uml_pt_regs *) = {  	[SIGIO]		= sigio_handler,  	[SIGVTALRM]	= timer_handler }; -static void sig_handler_common(int sig, mcontext_t *mc) +static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc)  {  	struct uml_pt_regs r;  	int save_errno = errno; @@ -40,7 +41,7 @@ static void sig_handler_common(int sig, mcontext_t *mc)  	if ((sig != SIGIO) && (sig != SIGWINCH) && (sig != SIGVTALRM))  		unblock_signals(); -	(*sig_info[sig])(sig, &r); +	(*sig_info[sig])(sig, si, &r);  	errno = save_errno;  } @@ -60,7 +61,7 @@ static void sig_handler_common(int sig, mcontext_t *mc)  static int signals_enabled;  static unsigned int signals_pending; -void sig_handler(int sig, mcontext_t *mc) +void sig_handler(int sig, siginfo_t *si, mcontext_t *mc)  {  	int enabled; @@ -72,7 +73,7 @@ void sig_handler(int sig, mcontext_t *mc)  	block_signals(); -	sig_handler_common(sig, mc); +	sig_handler_common(sig, si, mc);  	set_signals(enabled);  } @@ -85,10 +86,10 @@ static void real_alarm_handler(mcontext_t *mc)  		get_regs_from_mc(®s, mc);  	regs.is_user = 0;  	unblock_signals(); -	timer_handler(SIGVTALRM, ®s); +	timer_handler(SIGVTALRM, NULL, ®s);  } -void alarm_handler(int sig, mcontext_t *mc) +void alarm_handler(int sig, struct siginfo *unused_si, mcontext_t *mc)  {  	int enabled; @@ -119,7 +120,7 @@ void set_sigstack(void *sig_stack, int size)  		panic("enabling signal stack failed, errno = %d\n", errno);  } -static void (*handlers[_NSIG])(int sig, mcontext_t *mc) = { +static void (*handlers[_NSIG])(int sig, siginfo_t *si, mcontext_t *mc) = {  	[SIGSEGV] = sig_handler,  	[SIGBUS] = sig_handler,  	[SIGILL] = sig_handler, @@ -132,7 +133,7 @@ static void (*handlers[_NSIG])(int sig, mcontext_t *mc) = {  }; -static void hard_handler(int sig, siginfo_t *info, void *p) +static void hard_handler(int sig, siginfo_t *si, void *p)  {  	struct ucontext *uc = p;  	mcontext_t *mc = &uc->uc_mcontext; @@ -161,7 +162,7 @@ static void hard_handler(int sig, siginfo_t *info, void *p)  		while ((sig = ffs(pending)) != 0){  			sig--;  			pending &= ~(1 << sig); -			(*handlers[sig])(sig, mc); +			(*handlers[sig])(sig, si, mc);  		}  		/* @@ -273,9 +274,12 @@ void unblock_signals(void)  		 * Deal with SIGIO first because the alarm handler might  		 * schedule, leaving the pending SIGIO stranded until we come  		 * back here. +		 * +		 * SIGIO's handler doesn't use siginfo or mcontext, +		 * so they can be NULL.  		 */  		if (save_pending & SIGIO_MASK) -			sig_handler_common(SIGIO, NULL); +			sig_handler_common(SIGIO, NULL, NULL);  		if (save_pending & SIGVTALRM_MASK)  			real_alarm_handler(NULL);  |