xref: /openbsd/lib/libc/arch/sparc64/sys/sigsuspend.S (revision 83762a71)
1*83762a71Sderaadt/*	$OpenBSD: sigsuspend.S,v 1.5 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
3700b77682Sart#include "SYS.h"
3800b77682Sart
39fe38b55cSguentherSYSENTRY_HIDDEN(sigsuspend)
4000b77682Sart	ld	[%o0], %o0		/* indirect to mask argument */
4100b77682Sart	mov	SYS_sigsuspend, %g1
42*83762a71Sderaadt99:	t	ST_SYSCALL
43*83762a71Sderaadt	PINSYSCALL(SYS_sigsuspend, 99b)
4400b77682Sart	ERROR()				/* always terminates with EINTR */
45fe38b55cSguentherSYSCALL_END_HIDDEN(sigsuspend)
46