/* $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.
 */

	.file	"_sigaction.s"

	.ident	"$Header: _sigaction.s 1.2 89/04/17 $"

#include <sys.s>
/* #include <sysseq.s> */
#define INLIBC 1
#include <sys/signal.h>

/___________________________________________________________________
/ int _sigaction(int signo, struct sigaction as,struct sigaction oas);
/___________________________________________________________________
ENTRY(_sigaction)
	pushl	$sigclean	/ arg3	return address
	pushl	4+SPARG2	/ arg2	(was arg2) oas
	pushl	8+SPARG1	/ arg1	(was arg1) as
	pushl	12+SPARG0	/ arg0  (was arg0) signo
	orl	$SIGACTION,0(%esp)	
	movl	%esp,R1
	/* SVC(4,signal) */
	movl	$0x10030,%eax
	int	$0x2c
	jnc	_ok
	movl	%eax,errno
	movl	$-1,%eax
_ok:
	addl	$16,%esp	/ adjust stack
	ret

