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