trivial errors and GAS heartburn.
[unix-history] / usr / src / lib / libc / i386 / sys / sigprocmask.s
CommitLineData
c5c85c22
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * %sccs.include.redist.c%
9 */
10
11#if defined(SYSLIBC_SCCS) && !defined(lint)
2f996b04 12 .asciz "@(#)sigprocmask.s 5.2 (Berkeley) %G%"
c5c85c22
KB
13#endif /* SYSLIBC_SCCS and not lint */
14
15#include "SYS.h"
16
17err:
18 jmp cerror
19
20ENTRY(sigprocmask)
21 movl 8(%esp),%ecx # fetch new sigset pointer
2f996b04 22 cmpl $0,%ecx # check new sigset pointer
c5c85c22
KB
23 jne 1f # if not null, indirect
24/* movl $0,8(%esp) # null mask pointer: block empty set */
25 movl $1,4(%esp) # SIG_BLOCK
26 jmp 2f
271: movl (%ecx),%ecx # fetch indirect ...
28 movl %ecx,8(%esp) # to new mask arg
292: movl $ SYS_sigprocmask , %eax
30 LCALL(0x7,0)
31 jb err
32 movl 12(%esp),%ecx # fetch old mask requested
33 cmpl $0,%ecx # test if old mask requested
34 je out
35 movl %eax,(%ecx) # store old mask
36out:
37 xorl %eax,%eax
38 ret