xref: /netbsd-src/lib/libc/compat/arch/mips/sys/compat_sigpending.S (revision 252fbae288411a7ff535f9cf805079a3186f863d)
1*252fbae2Sskrll/*	$NetBSD: compat_sigpending.S,v 1.3 2020/10/15 05:27:53 skrll 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"
36f45a8c29Smatt#include "assym.h"
37f80595caStsutsui
38f80595caStsutsui#if defined(LIBC_SCCS) && !defined(lint)
39f45a8c29Smatt#if 0
40f45a8c29Smatt	RCSID("from: @(#)sigpending.s	8.1 (Berkeley) 6/4/93")
41f45a8c29Smatt#else
42*252fbae2Sskrll	RCSID("$NetBSD: compat_sigpending.S,v 1.3 2020/10/15 05:27:53 skrll Exp $")
43f45a8c29Smatt#endif
44f80595caStsutsui#endif /* LIBC_SCCS and not lint */
45f80595caStsutsui
46f80595caStsutsuiWARN_REFERENCES(sigpending, \
47f80595caStsutsui    "warning: reference to compatibility sigpending(); include <signal.h> for correct reference")
48f80595caStsutsui
49f80595caStsutsuiLEAF(sigpending)
50f45a8c29Smatt	PIC_PROLOGUE(sigpending)
51f45a8c29Smatt
52f45a8c29Smatt	SYSTRAP(compat_13_sigpending13)
53f80595caStsutsui	bne	a3, zero, 1f
54*252fbae2Sskrll	INT_S	v0, _SC_ONSTACK(a0)
55f80595caStsutsui	move	v0, zero
56f45a8c29Smatt	PIC_RETURN()
57f45a8c29Smatt
58f80595caStsutsui1:
59f45a8c29Smatt	PIC_TAILCALL(__cerror)
60f80595caStsutsuiEND(sigpending)
61