xref: /netbsd-src/lib/libc/compat/arch/alpha/sys/compat_sigprocmask.S (revision 153a0d2611ce40459d38496fdad456d2063b6bde)
1*153a0d26Sdrochner/* $NetBSD: compat_sigprocmask.S,v 1.1 2005/09/16 18:21:20 drochner Exp $ */
2*153a0d26Sdrochner
3*153a0d26Sdrochner/*
4*153a0d26Sdrochner * Copyright (c) 1994, 1995 Carnegie-Mellon University.
5*153a0d26Sdrochner * All rights reserved.
6*153a0d26Sdrochner *
7*153a0d26Sdrochner * Author: Chris G. Demetriou
8*153a0d26Sdrochner *
9*153a0d26Sdrochner * Permission to use, copy, modify and distribute this software and
10*153a0d26Sdrochner * its documentation is hereby granted, provided that both the copyright
11*153a0d26Sdrochner * notice and this permission notice appear in all copies of the
12*153a0d26Sdrochner * software, derivative works or modified versions, and any portions
13*153a0d26Sdrochner * thereof, and that both notices appear in supporting documentation.
14*153a0d26Sdrochner *
15*153a0d26Sdrochner * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
16*153a0d26Sdrochner * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
17*153a0d26Sdrochner * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18*153a0d26Sdrochner *
19*153a0d26Sdrochner * Carnegie Mellon requests users of this software to return to
20*153a0d26Sdrochner *
21*153a0d26Sdrochner *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
22*153a0d26Sdrochner *  School of Computer Science
23*153a0d26Sdrochner *  Carnegie Mellon University
24*153a0d26Sdrochner *  Pittsburgh PA 15213-3890
25*153a0d26Sdrochner *
26*153a0d26Sdrochner * any improvements or extensions that they make and grant Carnegie the
27*153a0d26Sdrochner * rights to redistribute these changes.
28*153a0d26Sdrochner */
29*153a0d26Sdrochner
30*153a0d26Sdrochner#include "SYS.h"
31*153a0d26Sdrochner
32*153a0d26SdrochnerWARN_REFERENCES(sigprocmask, \
33*153a0d26Sdrochner    "warning: reference to compatibility sigprocmask(); include <signal.h> for correct reference")
34*153a0d26Sdrochner
35*153a0d26SdrochnerLEAF(sigprocmask, 3)
36*153a0d26Sdrochner	mov	a2, a5			/* safe */
37*153a0d26Sdrochner	cmoveq	a1, 1, a0		/* if set == NULL, how = SIG_BLOCK */
38*153a0d26Sdrochner	beq	a1, Ldoit		/* and set = 0, and do it. */
39*153a0d26Sdrochner	ldl	a1, 0(a1)		/* load the set from *set */
40*153a0d26SdrochnerLdoit:	CALLSYS_ERROR(compat_13_sigprocmask13)
41*153a0d26Sdrochner	beq	a5, Lret		/* if they don't want old mask, done */
42*153a0d26Sdrochner	stl	v0, 0(a5)		/* otherwise, give it to them. */
43*153a0d26SdrochnerLret:	mov	zero, v0
44*153a0d26Sdrochner	RET
45*153a0d26Sdrochner
46*153a0d26Sdrochner	END(sigprocmask)
47*153a0d26Sdrochner
48