xref: /netbsd-src/sys/rump/librump/rumpkern/rump_curlwp_hypercall.h (revision 87fd18f8e547eaf74cc8b13c2004dc30f5ff1662)
1*87fd18f8Schristos /*	$NetBSD: rump_curlwp_hypercall.h,v 1.3 2018/04/19 21:50:10 christos Exp $	*/
235bcd6f8Spooka 
335bcd6f8Spooka /*-
435bcd6f8Spooka  * Copyright (c) 2014 Antti Kantee.  All Rights Reserved.
535bcd6f8Spooka  *
635bcd6f8Spooka  * Redistribution and use in source and binary forms, with or without
735bcd6f8Spooka  * modification, are permitted provided that the following conditions
835bcd6f8Spooka  * are met:
935bcd6f8Spooka  * 1. Redistributions of source code must retain the above copyright
1035bcd6f8Spooka  *    notice, this list of conditions and the following disclaimer.
1135bcd6f8Spooka  * 2. Redistributions in binary form must reproduce the above copyright
1235bcd6f8Spooka  *    notice, this list of conditions and the following disclaimer in the
1335bcd6f8Spooka  *    documentation and/or other materials provided with the distribution.
1435bcd6f8Spooka  *
1535bcd6f8Spooka  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
1635bcd6f8Spooka  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1735bcd6f8Spooka  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1835bcd6f8Spooka  * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1935bcd6f8Spooka  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2035bcd6f8Spooka  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2135bcd6f8Spooka  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2235bcd6f8Spooka  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2335bcd6f8Spooka  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2435bcd6f8Spooka  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2535bcd6f8Spooka  * SUCH DAMAGE.
2635bcd6f8Spooka  */
2735bcd6f8Spooka 
28b6db8002Spooka #ifdef RUMP__CURLWP_PRIVATE
2935bcd6f8Spooka #include <rump/rumpuser.h>
3035bcd6f8Spooka static void
lwproc_curlwpop(enum rumplwpop op,struct lwp * l)3135bcd6f8Spooka lwproc_curlwpop(enum rumplwpop op, struct lwp *l)
3235bcd6f8Spooka {
3335bcd6f8Spooka 
3435bcd6f8Spooka 	rumpuser_curlwpop(op, l);
3535bcd6f8Spooka }
3635bcd6f8Spooka #endif
3735bcd6f8Spooka 
38*87fd18f8Schristos static __inline struct lwp *
rump_curlwp_fast(void)3935bcd6f8Spooka rump_curlwp_fast(void)
4035bcd6f8Spooka {
4135bcd6f8Spooka 
4235bcd6f8Spooka 	return rump_lwproc_curlwp_hypercall();
4335bcd6f8Spooka }
44