xref: /netbsd-src/sys/arch/riscv/include/userret.h (revision 10ba7624820fb3a7ca5b89d6f3c466a413a8aecd)
1*10ba7624Sskrll /* $NetBSD: userret.h,v 1.1 2024/11/22 20:01:04 skrll Exp $ */
2*10ba7624Sskrll 
3*10ba7624Sskrll /*-
4*10ba7624Sskrll  * Copyright (c) 2014 The NetBSD Foundation, Inc.
5*10ba7624Sskrll  * All rights reserved.
6*10ba7624Sskrll  *
7*10ba7624Sskrll  * This code is derived from software contributed to The NetBSD Foundation
8*10ba7624Sskrll  * by Matt Thomas of 3am Software Foundry.
9*10ba7624Sskrll  *
10*10ba7624Sskrll  * Redistribution and use in source and binary forms, with or without
11*10ba7624Sskrll  * modification, are permitted provided that the following conditions
12*10ba7624Sskrll  * are met:
13*10ba7624Sskrll  * 1. Redistributions of source code must retain the above copyright
14*10ba7624Sskrll  *    notice, this list of conditions and the following disclaimer.
15*10ba7624Sskrll  * 2. Redistributions in binary form must reproduce the above copyright
16*10ba7624Sskrll  *    notice, this list of conditions and the following disclaimer in the
17*10ba7624Sskrll  *    documentation and/or other materials provided with the distribution.
18*10ba7624Sskrll  *
19*10ba7624Sskrll  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20*10ba7624Sskrll  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21*10ba7624Sskrll  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22*10ba7624Sskrll  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23*10ba7624Sskrll  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24*10ba7624Sskrll  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25*10ba7624Sskrll  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26*10ba7624Sskrll  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27*10ba7624Sskrll  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28*10ba7624Sskrll  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29*10ba7624Sskrll  * POSSIBILITY OF SUCH DAMAGE.
30*10ba7624Sskrll  */
31*10ba7624Sskrll 
32*10ba7624Sskrll #ifndef _RISCV_USERRET_H_
33*10ba7624Sskrll #define _RISCV_USERRET_H_
34*10ba7624Sskrll 
35*10ba7624Sskrll #include <sys/lwp.h>
36*10ba7624Sskrll #include <sys/userret.h>
37*10ba7624Sskrll 
38*10ba7624Sskrll static inline void
39*10ba7624Sskrll userret(struct lwp *l)
40*10ba7624Sskrll {
41*10ba7624Sskrll 	mi_userret(l);
42*10ba7624Sskrll }
43*10ba7624Sskrll 
44*10ba7624Sskrll #endif /* _RISCV_USERRET_H_ */
45