Skip to content

Commit

Permalink
x86: signal: cosmetic unification of sys_rt_sigreturn()
Browse files Browse the repository at this point in the history
Impact: cleanup

Add #ifdef directive for unification.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Hiroshi Shimamoto authored and Ingo Molnar committed Nov 23, 2008
1 parent 666ac7b commit 2456d73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/x86/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,19 @@ static long do_rt_sigreturn(struct pt_regs *regs)
return 0;
}

#ifdef CONFIG_X86_32
asmlinkage int sys_rt_sigreturn(unsigned long __unused)
{
struct pt_regs *regs = (struct pt_regs *)&__unused;

return do_rt_sigreturn(regs);
}
#else /* !CONFIG_X86_32 */
asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
{
return do_rt_sigreturn(regs);
}
#endif /* CONFIG_X86_32 */

/*
* Set up a signal frame.
Expand Down
9 changes: 9 additions & 0 deletions arch/x86/kernel/signal_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,19 @@ static long do_rt_sigreturn(struct pt_regs *regs)
return 0;
}

#ifdef CONFIG_X86_32
asmlinkage int sys_rt_sigreturn(unsigned long __unused)
{
struct pt_regs *regs = (struct pt_regs *)&__unused;

return do_rt_sigreturn(regs);
}
#else /* !CONFIG_X86_32 */
asmlinkage long sys_rt_sigreturn(struct pt_regs *regs)
{
return do_rt_sigreturn(regs);
}
#endif /* CONFIG_X86_32 */

/*
* Set up a signal frame.
Expand Down

0 comments on commit 2456d73

Please sign in to comment.