From cfc3d1cfdf8f470ceaa10cf99b2d0ed73ff1a9a9 Mon Sep 17 00:00:00 2001 From: kato Date: Wed, 29 Oct 1997 08:17:14 +0000 Subject: Implement linux_iopl and linux_nice. --- sys/i386/linux/linux_misc.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'sys/i386/linux/linux_misc.c') diff --git a/sys/i386/linux/linux_misc.c b/sys/i386/linux/linux_misc.c index 723732b..cc55b1e 100644 --- a/sys/i386/linux/linux_misc.c +++ b/sys/i386/linux/linux_misc.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_misc.c,v 1.29 1997/07/20 16:06:01 bde Exp $ + * $Id: linux_misc.c,v 1.30 1997/09/21 21:43:45 gibbs Exp $ */ #include @@ -52,6 +52,9 @@ #include #include +#include +#include + #include #include #include @@ -931,3 +934,30 @@ linux_getitimer(struct proc *p, struct linux_getitimer_args *args, int *retval) bsa.itv = args->itv; return getitimer(p, &bsa, retval); } + +int +linux_iopl(struct proc *p, struct linux_iopl_args *args, int *retval) +{ + int error; + struct trapframe *fp; + + error = suser(p->p_ucred, &p->p_acflag); + if (error) + return (error); + fp = (struct trapframe *)p->p_md.md_regs; + fp->tf_eflags |= PSL_IOPL; + + return 0; +} + +int +linux_nice(struct proc *p, struct linux_nice_args *args, int *retval) +{ + struct setpriority_args bsd_args; + + bsd_args.which = PRIO_PROCESS; + bsd_args.who = 0; /* current process */ + bsd_args.prio = args->inc; + return setpriority(p, &bsd_args, retval); +} + -- cgit v1.1