xref: /netbsd-src/lib/libc/compat/arch/sh3/sys/compat_sigsuspend.S (revision 577f0b80c0099e2fd919cfa86196282e00ea976f)
1*577f0b80Suwe/*	$NetBSD: compat_sigsuspend.S,v 1.3 2006/01/06 04:05:55 uwe Exp $	*/
2bdfc6e2eSuwe
3bdfc6e2eSuwe/*-
4bdfc6e2eSuwe * Copyright (c) 1990 The Regents of the University of California.
5bdfc6e2eSuwe * All rights reserved.
6bdfc6e2eSuwe *
7bdfc6e2eSuwe * This code is derived from software contributed to Berkeley by
8bdfc6e2eSuwe * William Jolitz.
9bdfc6e2eSuwe *
10bdfc6e2eSuwe * Redistribution and use in source and binary forms, with or without
11bdfc6e2eSuwe * modification, are permitted provided that the following conditions
12bdfc6e2eSuwe * are met:
13bdfc6e2eSuwe * 1. Redistributions of source code must retain the above copyright
14bdfc6e2eSuwe *    notice, this list of conditions and the following disclaimer.
15bdfc6e2eSuwe * 2. Redistributions in binary form must reproduce the above copyright
16bdfc6e2eSuwe *    notice, this list of conditions and the following disclaimer in the
17bdfc6e2eSuwe *    documentation and/or other materials provided with the distribution.
18bdfc6e2eSuwe * 3. Neither the name of the University nor the names of its contributors
19bdfc6e2eSuwe *    may be used to endorse or promote products derived from this software
20bdfc6e2eSuwe *    without specific prior written permission.
21bdfc6e2eSuwe *
22bdfc6e2eSuwe * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23bdfc6e2eSuwe * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24bdfc6e2eSuwe * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25bdfc6e2eSuwe * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26bdfc6e2eSuwe * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27bdfc6e2eSuwe * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28bdfc6e2eSuwe * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29bdfc6e2eSuwe * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30bdfc6e2eSuwe * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31bdfc6e2eSuwe * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32bdfc6e2eSuwe * SUCH DAMAGE.
33bdfc6e2eSuwe *
34bdfc6e2eSuwe *	from: @(#)sigsuspend.s	5.2 (Berkeley) 12/17/90
35bdfc6e2eSuwe */
36bdfc6e2eSuwe
37bdfc6e2eSuwe#include <machine/asm.h>
38bdfc6e2eSuwe#if defined(SYSLIBC_SCCS) && !defined(lint)
39*577f0b80Suwe	RCSID("$NetBSD: compat_sigsuspend.S,v 1.3 2006/01/06 04:05:55 uwe Exp $")
40bdfc6e2eSuwe#endif /* SYSLIBC_SCCS and not lint */
41bdfc6e2eSuwe
42bdfc6e2eSuwe#include "SYS.h"
43bdfc6e2eSuwe
44*577f0b80SuweWARN_REFERENCES(sigsuspend, \
45*577f0b80Suwe    "warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference")
46*577f0b80Suwe
47*577f0b80Suwe/*
48*577f0b80Suwe * int sigsuspend(const sigset_t *sigmask);
49*577f0b80Suwe */
50bdfc6e2eSuweENTRY(sigsuspend)
51*577f0b80Suwe	mov.l	@r4, r4		/* syscall expects mask as the argument */
52*577f0b80Suwe	mov	#SYS_compat_13_sigsuspend13, r0
53bdfc6e2eSuwe	trapa	#0x80
54bdfc6e2eSuwe	bf	err
55*577f0b80Suwe	rts			/* shouldn t happen */
56*577f0b80Suwe	 mov	#0, r0
57bdfc6e2eSuweerr:
58b46734f0Suwe	JUMP_CERROR
59bdfc6e2eSuwe
60b46734f0Suwe	SET_ENTRY_SIZE(sigsuspend)
61