xref: /openbsd/lib/libc/arch/sparc64/sys/sigpending.S (revision 83762a71)
1*83762a71Sderaadt/*	$OpenBSD: sigpending.S,v 1.4 2023/12/10 16:45:52 deraadt Exp $	*/
200b77682Sart/*
300b77682Sart * Copyright (c) 1992, 1993
400b77682Sart *	The Regents of the University of California.  All rights reserved.
500b77682Sart *
600b77682Sart * This software was developed by the Computer Systems Engineering group
700b77682Sart * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
800b77682Sart * contributed to Berkeley.
900b77682Sart *
1000b77682Sart * Redistribution and use in source and binary forms, with or without
1100b77682Sart * modification, are permitted provided that the following conditions
1200b77682Sart * are met:
1300b77682Sart * 1. Redistributions of source code must retain the above copyright
1400b77682Sart *    notice, this list of conditions and the following disclaimer.
1500b77682Sart * 2. Redistributions in binary form must reproduce the above copyright
1600b77682Sart *    notice, this list of conditions and the following disclaimer in the
1700b77682Sart *    documentation and/or other materials provided with the distribution.
186580fee3Smillert * 3. Neither the name of the University nor the names of its contributors
1900b77682Sart *    may be used to endorse or promote products derived from this software
2000b77682Sart *    without specific prior written permission.
2100b77682Sart *
2200b77682Sart * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2300b77682Sart * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2400b77682Sart * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2500b77682Sart * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2600b77682Sart * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2700b77682Sart * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2800b77682Sart * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2900b77682Sart * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3000b77682Sart * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3100b77682Sart * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3200b77682Sart * SUCH DAMAGE.
3300b77682Sart */
3400b77682Sart
3500b77682Sart#include <machine/asm.h>
3600b77682Sart#include "SYS.h"
3700b77682Sart
3800b77682SartSYSENTRY(sigpending)
3900b77682Sart	mov	%o0, %o2		/* save pointer */
4000b77682Sart	mov	SYS_sigpending, %g1
41*83762a71Sderaadt99:	t	ST_SYSCALL		/* sigpending() */
42*83762a71Sderaadt	PINSYSCALL(SYS_sigpending, 99b)
4300b77682Sart	bcc,a	1f			/* if success, */
4400b77682Sart	 st	%o0, [%o2]		/*    store return value */
4500b77682Sart	ERROR()
4600b77682Sart1:
4700b77682Sart	retl				/* and return 0 */
4800b77682Sart	 clr	%o0
49aa797096SguentherSYSCALL_END(sigpending)
50