Commit c52c2ddc1dfa6fe85ffd5e4c57cf91f6982639fe

Authored by Al Viro
Committed by Linus Torvalds
1 parent 32163f4b2c

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

get rid of a useless wrapper, while we are at it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 3 changed files with 12 additions and 47 deletions Side-by-side Diff

arch/alpha/kernel/entry.S
... ... @@ -915,15 +915,6 @@
915 915 .end sys_execve
916 916  
917 917 .align 4
918   - .globl osf_sigprocmask
919   - .ent osf_sigprocmask
920   -osf_sigprocmask:
921   - .prologue 0
922   - mov $sp, $18
923   - jmp $31, sys_osf_sigprocmask
924   -.end osf_sigprocmask
925   -
926   - .align 4
927 918 .globl alpha_ni_syscall
928 919 .ent alpha_ni_syscall
929 920 alpha_ni_syscall:
arch/alpha/kernel/signal.c
... ... @@ -41,46 +41,20 @@
41 41 /*
42 42 * The OSF/1 sigprocmask calling sequence is different from the
43 43 * C sigprocmask() sequence..
44   - *
45   - * how:
46   - * 1 - SIG_BLOCK
47   - * 2 - SIG_UNBLOCK
48   - * 3 - SIG_SETMASK
49   - *
50   - * We change the range to -1 .. 1 in order to let gcc easily
51   - * use the conditional move instructions.
52   - *
53   - * Note that we don't need to acquire the kernel lock for SMP
54   - * operation, as all of this is local to this thread.
55 44 */
56   -SYSCALL_DEFINE3(osf_sigprocmask, int, how, unsigned long, newmask,
57   - struct pt_regs *, regs)
  45 +SYSCALL_DEFINE2(osf_sigprocmask, int, how, unsigned long, newmask)
58 46 {
59   - unsigned long oldmask = -EINVAL;
  47 + sigset_t oldmask;
  48 + sigset_t mask;
  49 + unsigned long res;
60 50  
61   - if ((unsigned long)how-1 <= 2) {
62   - long sign = how-2; /* -1 .. 1 */
63   - unsigned long block, unblock;
64   -
65   - newmask &= _BLOCKABLE;
66   - spin_lock_irq(&current->sighand->siglock);
67   - oldmask = current->blocked.sig[0];
68   -
69   - unblock = oldmask & ~newmask;
70   - block = oldmask | newmask;
71   - if (!sign)
72   - block = unblock;
73   - if (sign <= 0)
74   - newmask = block;
75   - if (_NSIG_WORDS > 1 && sign > 0)
76   - sigemptyset(&current->blocked);
77   - current->blocked.sig[0] = newmask;
78   - recalc_sigpending();
79   - spin_unlock_irq(&current->sighand->siglock);
80   -
81   - regs->r0 = 0; /* special no error return */
  51 + siginitset(&mask, newmask & ~_BLOCKABLE);
  52 + res = siprocmask(how, &mask, &oldmask);
  53 + if (!res) {
  54 + force_successful_syscall_return();
  55 + res = oldmask->sig[0];
82 56 }
83   - return oldmask;
  57 + return res;
84 58 }
85 59  
86 60 SYSCALL_DEFINE3(osf_sigaction, int, sig,
arch/alpha/kernel/systbls.S
... ... @@ -58,7 +58,7 @@
58 58 .quad sys_open /* 45 */
59 59 .quad alpha_ni_syscall
60 60 .quad sys_getxgid
61   - .quad osf_sigprocmask
  61 + .quad sys_osf_sigprocmask
62 62 .quad alpha_ni_syscall
63 63 .quad alpha_ni_syscall /* 50 */
64 64 .quad sys_acct