mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 10:18:08 +00:00
x86: signal: make NR_restart_syscall
make NR_restart_syscall macro for cosmetic unification of handle_signal(). Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
72fa50f4ef
commit
8fcd8e20f3
@ -572,6 +572,7 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define NR_restart_syscall __NR_restart_syscall
|
||||||
/*
|
/*
|
||||||
* Note that 'init' is a special process: it doesn't get signals it doesn't
|
* Note that 'init' is a special process: it doesn't get signals it doesn't
|
||||||
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
||||||
@ -635,7 +636,7 @@ static void do_signal(struct pt_regs *regs)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case -ERESTART_RESTARTBLOCK:
|
case -ERESTART_RESTARTBLOCK:
|
||||||
regs->ax = __NR_restart_syscall;
|
regs->ax = NR_restart_syscall;
|
||||||
regs->ip -= 2;
|
regs->ip -= 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -362,6 +362,8 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define NR_restart_syscall \
|
||||||
|
test_thread_flag(TIF_IA32) ? __NR_ia32_restart_syscall : __NR_restart_syscall
|
||||||
/*
|
/*
|
||||||
* Note that 'init' is a special process: it doesn't get signals it doesn't
|
* Note that 'init' is a special process: it doesn't get signals it doesn't
|
||||||
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
* want to handle. Thus you cannot kill init even with a SIGKILL even by
|
||||||
@ -423,9 +425,7 @@ static void do_signal(struct pt_regs *regs)
|
|||||||
regs->ip -= 2;
|
regs->ip -= 2;
|
||||||
break;
|
break;
|
||||||
case -ERESTART_RESTARTBLOCK:
|
case -ERESTART_RESTARTBLOCK:
|
||||||
regs->ax = test_thread_flag(TIF_IA32) ?
|
regs->ax = NR_restart_syscall;
|
||||||
__NR_ia32_restart_syscall :
|
|
||||||
__NR_restart_syscall;
|
|
||||||
regs->ip -= 2;
|
regs->ip -= 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user