diff options
Diffstat (limited to 'sys/compat/linux')
| -rw-r--r-- | sys/compat/linux/linux_misc.c | 32 | 
1 files changed, 31 insertions, 1 deletions
| diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 723732b0fe28..cc55b1e1e636 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/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 <sys/param.h> @@ -52,6 +52,9 @@  #include <vm/vm_map.h>  #include <vm/vm_extern.h> +#include <machine/cpu.h> +#include <machine/psl.h> +  #include <i386/linux/linux.h>  #include <i386/linux/linux_proto.h>  #include <i386/linux/linux_util.h> @@ -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); +} + | 
