xref: /original-bsd/lib/libc/tahoe/sys/sigprocmask.s (revision c3e32dec)
1/*
2 * Copyright (c) 1989, 1993
3 *	The Regents of the University of California.  All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 */
7
8#if defined(SYSLIBC_SCCS) && !defined(lint)
9	.asciz "@(#)sigprocmask.s	8.1 (Berkeley) 06/04/93"
10#endif /* SYSLIBC_SCCS and not lint */
11
12#include "SYS.h"
13
14err:
15	jmp	cerror
16
17ENTRY(sigprocmask)
18	tstl	8(fp)			# check new sigset pointer
19	bneq	1f			# if not null, indirect
20	movl	$0,8(fp)		# null mask pointer: block empty set
21	movl	$1,4(fp)		# SIG_BLOCK
22	jbr	2f
231:	movl	*8(fp),8(fp)		# indirect to new mask arg
242:	kcall	$SYS_sigprocmask
25	jcs	err
26	tstl	12(fp)			# test if old mask requested
27	beql	out
28	movl	r0,*12(fp)		# store old mask
29out:
30	clrl	r0
31	ret
32