xref: /csrg-svn/lib/libc/hp300/sys/sigprocmask.s (revision 61125)
141855Sbostic/*-
2*61125Sbostic * Copyright (c) 1990, 1993
3*61125Sbostic *	The Regents of the University of California.  All rights reserved.
441855Sbostic *
541855Sbostic * This code is derived from software contributed to Berkeley by
641855Sbostic * the Systems Programming Group of the University of Utah Computer
741855Sbostic * Science Department.
841855Sbostic *
941855Sbostic * %sccs.include.redist.c%
1041855Sbostic */
1141855Sbostic
1241855Sbostic#if defined(LIBC_SCCS) && !defined(lint)
13*61125Sbostic	.asciz "@(#)sigprocmask.s	8.1 (Berkeley) 06/04/93"
1441855Sbostic#endif /* LIBC_SCCS and not lint */
1541855Sbostic
1641855Sbostic#include "SYS.h"
1741855Sbostic
1842937Sbostic	.even
1941855Sbosticerr:
2041855Sbostic	jmp	cerror
2141855Sbostic
2241855SbosticENTRY(sigprocmask)
2341855Sbostic	tstl	sp@(8)			/* check new sigset pointer */
2441855Sbostic	jne	gotptr			/* if not null, indirect */
2541855Sbostic/*	movl	#0,sp@(8)		/* null mask pointer: block empty set */
2641855Sbostic	movl	#1,sp@(4)		/* SIG_BLOCK */
2741855Sbostic	jra	doit
2841855Sbosticgotptr:
2941855Sbostic	movl	sp@(8),a0
3041855Sbostic	movl	a0@,sp@(8)		/* indirect to new mask arg */
3141855Sbosticdoit:
3241855Sbostic	movl	#SYS_sigprocmask,d0
3341855Sbostic	trap	#0
3441855Sbostic	jcs	err
3541855Sbostic	tstl	sp@(12)			/* test if old mask requested */
3641855Sbostic	jeq	out
3741855Sbostic	movl	sp@(12),a0
3841855Sbostic	movl	d0,a0@			/* store old mask */
3941855Sbosticout:
4041855Sbostic	clrl	d0
4141855Sbostic	rts
42