Commit c52c2ddc authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

alpha: switch osf_sigprocmask() to use of sigprocmask()

get rid of a useless wrapper, while we are at it
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 32163f4b
...@@ -914,15 +914,6 @@ sys_execve: ...@@ -914,15 +914,6 @@ sys_execve:
jmp $31, do_sys_execve jmp $31, do_sys_execve
.end sys_execve .end sys_execve
.align 4
.globl osf_sigprocmask
.ent osf_sigprocmask
osf_sigprocmask:
.prologue 0
mov $sp, $18
jmp $31, sys_osf_sigprocmask
.end osf_sigprocmask
.align 4 .align 4
.globl alpha_ni_syscall .globl alpha_ni_syscall
.ent alpha_ni_syscall .ent alpha_ni_syscall
......
...@@ -41,46 +41,20 @@ static void do_signal(struct pt_regs *, struct switch_stack *, ...@@ -41,46 +41,20 @@ static void do_signal(struct pt_regs *, struct switch_stack *,
/* /*
* The OSF/1 sigprocmask calling sequence is different from the * The OSF/1 sigprocmask calling sequence is different from the
* C sigprocmask() sequence.. * C sigprocmask() sequence..
*
* how:
* 1 - SIG_BLOCK
* 2 - SIG_UNBLOCK
* 3 - SIG_SETMASK
*
* We change the range to -1 .. 1 in order to let gcc easily
* use the conditional move instructions.
*
* Note that we don't need to acquire the kernel lock for SMP
* operation, as all of this is local to this thread.
*/ */
SYSCALL_DEFINE3(osf_sigprocmask, int, how, unsigned long, newmask, SYSCALL_DEFINE2(osf_sigprocmask, int, how, unsigned long, newmask)
struct pt_regs *, regs)
{ {
unsigned long oldmask = -EINVAL; sigset_t oldmask;
sigset_t mask;
if ((unsigned long)how-1 <= 2) { unsigned long res;
long sign = how-2; /* -1 .. 1 */
unsigned long block, unblock; siginitset(&mask, newmask & ~_BLOCKABLE);
res = siprocmask(how, &mask, &oldmask);
newmask &= _BLOCKABLE; if (!res) {
spin_lock_irq(&current->sighand->siglock); force_successful_syscall_return();
oldmask = current->blocked.sig[0]; res = oldmask->sig[0];
unblock = oldmask & ~newmask;
block = oldmask | newmask;
if (!sign)
block = unblock;
if (sign <= 0)
newmask = block;
if (_NSIG_WORDS > 1 && sign > 0)
sigemptyset(&current->blocked);
current->blocked.sig[0] = newmask;
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
regs->r0 = 0; /* special no error return */
} }
return oldmask; return res;
} }
SYSCALL_DEFINE3(osf_sigaction, int, sig, SYSCALL_DEFINE3(osf_sigaction, int, sig,
......
...@@ -58,7 +58,7 @@ sys_call_table: ...@@ -58,7 +58,7 @@ sys_call_table:
.quad sys_open /* 45 */ .quad sys_open /* 45 */
.quad alpha_ni_syscall .quad alpha_ni_syscall
.quad sys_getxgid .quad sys_getxgid
.quad osf_sigprocmask .quad sys_osf_sigprocmask
.quad alpha_ni_syscall .quad alpha_ni_syscall
.quad alpha_ni_syscall /* 50 */ .quad alpha_ni_syscall /* 50 */
.quad sys_acct .quad sys_acct
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment