1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1993 The Regents of the University of California.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 *    may be used to endorse or promote products derived from this software
17 *    without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 *	from: FreeBSD: src/sys/i386/include/sysarch.h,v 1.14 2000/09/21
32 * $FreeBSD$
33 */
34
35/*
36 * Architecture specific syscalls (sparc64)
37 */
38#ifndef _MACHINE_SYSARCH_H_
39#define _MACHINE_SYSARCH_H_
40
41#include <machine/utrap.h>
42
43#define	SPARC_UTRAP_INSTALL	1
44#define	SPARC_SIGTRAMP_INSTALL	2
45
46struct sparc_utrap_install_args {
47	int num;
48	const struct sparc_utrap_args *handlers;
49};
50
51struct sparc_sigtramp_install_args {
52	void	*sia_new;
53	void	**sia_old;
54};
55
56struct sparc_utrap_args {
57	utrap_entry_t type;
58	utrap_handler_t new_precise;
59	utrap_handler_t new_deferred;
60	utrap_handler_t *old_precise;
61	utrap_handler_t *old_deferred;
62};
63
64#ifndef _KERNEL
65#include <sys/cdefs.h>
66
67__BEGIN_DECLS
68int	__sparc_utrap_install(utrap_entry_t _type,
69	    utrap_handler_t _new_precise, utrap_handler_t _new_deferred,
70	    utrap_handler_t *_old_precise, utrap_handler_t *_old_deferred);
71int	sysarch(int _number, void *_args);
72__END_DECLS
73
74#endif
75
76#endif /* !_MACHINE_SYSARCH_H_ */
77