xref: /original-bsd/lib/libc/hp300/sys/sigprocmask.s (revision 695466df)
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 * the Systems Programming Group of the University of Utah Computer
7 * Science Department.
8 *
9 * %sccs.include.redist.c%
10 */
11
12#if defined(LIBC_SCCS) && !defined(lint)
13	.asciz "@(#)sigprocmask.s	5.1 (Berkeley) 05/12/90"
14#endif /* LIBC_SCCS and not lint */
15
16#include "SYS.h"
17
18err:
19	jmp	cerror
20
21ENTRY(sigprocmask)
22	tstl	sp@(8)			/* check new sigset pointer */
23	jne	gotptr			/* if not null, indirect */
24/*	movl	#0,sp@(8)		/* null mask pointer: block empty set */
25	movl	#1,sp@(4)		/* SIG_BLOCK */
26	jra	doit
27gotptr:
28	movl	sp@(8),a0
29	movl	a0@,sp@(8)		/* indirect to new mask arg */
30doit:
31	movl	#SYS_sigprocmask,d0
32	trap	#0
33	jcs	err
34	tstl	sp@(12)			/* test if old mask requested */
35	jeq	out
36	movl	sp@(12),a0
37	movl	d0,a0@			/* store old mask */
38out:
39	clrl	d0
40	rts
41