11.13Smaxv/* $NetBSD: userret.h,v 1.13 2018/07/26 09:29:08 maxv Exp $ */ 21.1Sfvdl 31.1Sfvdl/* 41.1Sfvdl * XXXfvdl same as i386 counterpart, but should probably be independent. 51.1Sfvdl */ 61.1Sfvdl 71.1Sfvdl/*- 81.1Sfvdl * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. 91.1Sfvdl * All rights reserved. 101.1Sfvdl * 111.1Sfvdl * This code is derived from software contributed to The NetBSD Foundation 121.1Sfvdl * by Charles M. Hannum. 131.1Sfvdl * 141.1Sfvdl * Redistribution and use in source and binary forms, with or without 151.1Sfvdl * modification, are permitted provided that the following conditions 161.1Sfvdl * are met: 171.1Sfvdl * 1. Redistributions of source code must retain the above copyright 181.1Sfvdl * notice, this list of conditions and the following disclaimer. 191.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 201.1Sfvdl * notice, this list of conditions and the following disclaimer in the 211.1Sfvdl * documentation and/or other materials provided with the distribution. 221.1Sfvdl * 231.1Sfvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 241.1Sfvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 251.1Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 261.1Sfvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 271.1Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 281.1Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 291.1Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 301.1Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 311.1Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 321.1Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 331.1Sfvdl * POSSIBILITY OF SUCH DAMAGE. 341.1Sfvdl */ 351.1Sfvdl 361.1Sfvdl/*- 371.1Sfvdl * Copyright (c) 1990 The Regents of the University of California. 381.1Sfvdl * All rights reserved. 391.1Sfvdl * 401.1Sfvdl * This code is derived from software contributed to Berkeley by 411.1Sfvdl * William Jolitz. 421.1Sfvdl * 431.1Sfvdl * Redistribution and use in source and binary forms, with or without 441.1Sfvdl * modification, are permitted provided that the following conditions 451.1Sfvdl * are met: 461.1Sfvdl * 1. Redistributions of source code must retain the above copyright 471.1Sfvdl * notice, this list of conditions and the following disclaimer. 481.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 491.1Sfvdl * notice, this list of conditions and the following disclaimer in the 501.1Sfvdl * documentation and/or other materials provided with the distribution. 511.2Sagc * 3. Neither the name of the University nor the names of its contributors 521.1Sfvdl * may be used to endorse or promote products derived from this software 531.1Sfvdl * without specific prior written permission. 541.1Sfvdl * 551.1Sfvdl * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 561.1Sfvdl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 571.1Sfvdl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 581.1Sfvdl * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 591.1Sfvdl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 601.1Sfvdl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 611.1Sfvdl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 621.1Sfvdl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 631.1Sfvdl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 641.1Sfvdl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 651.1Sfvdl * SUCH DAMAGE. 661.1Sfvdl * 671.1Sfvdl */ 681.1Sfvdl 691.3Scl#include <sys/userret.h> 701.3Scl 711.7Ssimonbstatic __inline void userret(struct lwp *); 721.1Sfvdl 731.1Sfvdl/* 741.1Sfvdl * Define the code needed before returning to user mode, for 751.1Sfvdl * trap and syscall. 761.1Sfvdl */ 771.6Sperrystatic __inline void 781.7Ssimonbuserret(struct lwp *l) 791.1Sfvdl{ 801.3Scl /* Invoke MI userret code */ 811.3Scl mi_userret(l); 821.1Sfvdl} 83