xref: /netbsd-src/lib/libc/compat/arch/mips/sys/compat_sigsuspend.S (revision f45a8c29f553073ffe31e0a4a07df0480622c514)
1*f45a8c29Smatt/*	$NetBSD: compat_sigsuspend.S,v 1.2 2009/12/14 03:04:33 matt Exp $	*/
2f80595caStsutsui
3f80595caStsutsui/*-
4f80595caStsutsui * Copyright (c) 1991, 1993
5f80595caStsutsui *	The Regents of the University of California.  All rights reserved.
6f80595caStsutsui *
7f80595caStsutsui * This code is derived from software contributed to Berkeley by
8f80595caStsutsui * Ralph Campbell.
9f80595caStsutsui *
10f80595caStsutsui * Redistribution and use in source and binary forms, with or without
11f80595caStsutsui * modification, are permitted provided that the following conditions
12f80595caStsutsui * are met:
13f80595caStsutsui * 1. Redistributions of source code must retain the above copyright
14f80595caStsutsui *    notice, this list of conditions and the following disclaimer.
15f80595caStsutsui * 2. Redistributions in binary form must reproduce the above copyright
16f80595caStsutsui *    notice, this list of conditions and the following disclaimer in the
17f80595caStsutsui *    documentation and/or other materials provided with the distribution.
18f80595caStsutsui * 3. Neither the name of the University nor the names of its contributors
19f80595caStsutsui *    may be used to endorse or promote products derived from this software
20f80595caStsutsui *    without specific prior written permission.
21f80595caStsutsui *
22f80595caStsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23f80595caStsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24f80595caStsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25f80595caStsutsui * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26f80595caStsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27f80595caStsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28f80595caStsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29f80595caStsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30f80595caStsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31f80595caStsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32f80595caStsutsui * SUCH DAMAGE.
33f80595caStsutsui */
34f80595caStsutsui
35f80595caStsutsui#include "SYS.h"
36f80595caStsutsui
37f80595caStsutsui#if defined(LIBC_SCCS) && !defined(lint)
38*f45a8c29Smatt#if 0
39*f45a8c29Smatt	RCSID("from: @(#)sigsuspend.s	8.1 (Berkeley) 6/4/93")
40*f45a8c29Smatt#else
41*f45a8c29Smatt	RCSID("$NetBSD: compat_sigsuspend.S,v 1.2 2009/12/14 03:04:33 matt Exp $")
42*f45a8c29Smatt#endif
43f80595caStsutsui#endif /* LIBC_SCCS and not lint */
44f80595caStsutsui
45f80595caStsutsuiWARN_REFERENCES(sigsuspend, \
46f80595caStsutsui    "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference")
47f80595caStsutsui
48f80595caStsutsuiLEAF(sigsuspend)
49*f45a8c29Smatt	PIC_PROLOGUE(sigsuspend)
50*f45a8c29Smatt
51*f45a8c29Smatt	INT_L	a0, 0(a0)		# indirect to mask arg
52*f45a8c29Smatt	SYSTRAP(compat_13_sigsuspend13)
53f80595caStsutsui	bne	a3, zero, 1f
54f80595caStsutsui	move	v0, zero		# should not happen
55*f45a8c29Smatt	PIC_RETURN()
56f80595caStsutsui1:
57*f45a8c29Smatt	PIC_TAILCALL(__cerror)
58f80595caStsutsuiEND(sigsuspend)
59