Fix mdoc(7)/man(7) mix up.
[netbsd-mini2440.git] / lib / libc / compat / arch / powerpc / sys / compat_sigprocmask13.S
blob768edb6ba31d88600b424026deaa9c5a522a4793
1 /*      $NetBSD: sigprocmask.S,v 1.8 2002/07/30 06:08:01 matt Exp $     */
3 #include "SYS.h"
5 WARN_REFERENCES(sigprocmask, \
6     "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference")
8 /*
9  * sigprocmask(int how, sigset_t *set, sigset_t *oset)
10  */
11 ENTRY(sigprocmask)
12         or.     %r4,%r4,%r4     # set == NULL?
13         li      %r6,1           # how = SIG_BLOCK
14         beq     1f
15         lwz     %r4,0(%r4)      # if not, replace it in r4 with *set
16         mr      %r6,%r3
18         mr      %r3,%r6         # ... using sigprocmask(SIG_BLOCK)
19         li      %r0,SYS_compat_13_sigprocmask13
20         sc
21         bso     3f
22         or.     %r5,%r5,%r5     # check to see of oset requested
23         beq     2f              # if oset != NULL,
24         stw     %r3,0(%r5)      #    *oset = oldmask
26         li      %r3,0
27         blr                     # in any case, return 0
29         b       PIC_PLT(_C_LABEL(__cerror))