xref: /openbsd-src/lib/libc/arch/alpha/sys/sigprocmask.S (revision 5aed4d28d43eadb2b7771720ac4d094bec87d515)
1*5aed4d28Sguenther/*	$OpenBSD: sigprocmask.S,v 1.6 2015/10/23 04:39:24 guenther Exp $	*/
239bae441Sniklas/*	$NetBSD: sigprocmask.S,v 1.2 1996/10/17 03:08:21 cgd Exp $	*/
339bae441Sniklas
4df930be7Sderaadt/*
5df930be7Sderaadt * Copyright (c) 1994, 1995 Carnegie-Mellon University.
6df930be7Sderaadt * All rights reserved.
7df930be7Sderaadt *
8df930be7Sderaadt * Author: Chris G. Demetriou
9df930be7Sderaadt *
10df930be7Sderaadt * Permission to use, copy, modify and distribute this software and
11df930be7Sderaadt * its documentation is hereby granted, provided that both the copyright
12df930be7Sderaadt * notice and this permission notice appear in all copies of the
13df930be7Sderaadt * software, derivative works or modified versions, and any portions
14df930be7Sderaadt * thereof, and that both notices appear in supporting documentation.
15df930be7Sderaadt *
16df930be7Sderaadt * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
17df930be7Sderaadt * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
18df930be7Sderaadt * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
19df930be7Sderaadt *
20df930be7Sderaadt * Carnegie Mellon requests users of this software to return to
21df930be7Sderaadt *
22df930be7Sderaadt *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
23df930be7Sderaadt *  School of Computer Science
24df930be7Sderaadt *  Carnegie Mellon University
25df930be7Sderaadt *  Pittsburgh PA 15213-3890
26df930be7Sderaadt *
27df930be7Sderaadt * any improvements or extensions that they make and grant Carnegie the
28df930be7Sderaadt * rights to redistribute these changes.
29df930be7Sderaadt */
30df930be7Sderaadt
31df930be7Sderaadt#include "SYS.h"
32df930be7Sderaadt
33*5aed4d28SguentherSYSLEAF_HIDDEN(sigprocmask, 3)
34df930be7Sderaadt	mov	a2, a5			/* safe */
35df930be7Sderaadt	cmoveq	a1, 1, a0		/* if set == NULL, how = SIG_BLOCK */
36df930be7Sderaadt	beq	a1, Ldoit		/* and set = 0, and do it. */
37df930be7Sderaadt	ldl	a1, 0(a1)		/* load the set from *set */
3839bae441SniklasLdoit:	CALLSYS_ERROR(sigprocmask)
39df930be7Sderaadt	beq	a5, Lret		/* if they don't want old mask, done */
40df930be7Sderaadt	stl	v0, 0(a5)		/* otherwise, give it to them. */
41df930be7SderaadtLret:	mov	zero, v0
42df930be7Sderaadt	RET
43df930be7Sderaadt
44*5aed4d28SguentherSYSCALL_END_HIDDEN(sigprocmask)
45