	.file	"sigaction.s"
/*
 * $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.
 *
 */

/	Copyright (c) 1984 AT&T
/	  All Rights Reserved

/	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
/	The copyright notice above does not evidence any
/	actual or intended publication of such source code.

	.ident	"@(#)$Header: sigaction.s 1.2 89/10/10 $"

#include "sys.s"
#include "sysseq.s"
#define INLIBC 1
#include "sys/signal.h"

#undef SYS_TYP
#define SYS_TYP	1

/___________________________________________________________________
/ void	(*sigset(int sig, viod (*func)(int)))(int);
/___________________________________________________________________
ENTRY(sigset)
	pushl	$sigclean	/ arg2	return address
	pushl	4+SPARG1	/ arg1	(was arg1) void (*fun())()
	pushl	8+SPARG0	/ arg0  (was arg0) int signo
	orl	$SIGDEFER,0(%esp)	
	movl	%esp,R1
	SVC(3,signal)
	jnc	_12ok
_12cerror:
	movl	%eax,errno
	movl	$-1,%eax
_12ok:
	addl	$12,%esp	/ adjust stack
	ret

/___________________________________________________________________
/ 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)
	jnc	_16ok
	movl	%eax,errno
	movl	$-1,%eax
_16ok:
	addl	$16,%esp	/ adjust stack
	ret
