2 * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
7 #include "asm/uaccess.h"
8 #include "asm/unistd.h"
11 * Perform the select(nd, in, out, ex, tv) and mmap() system
12 * calls. Linux/i386 didn't use to be able to handle more than
13 * 4 system call parameters, so these system calls used a memory
14 * block for parameter passing..
17 struct mmap_arg_struct {
26 extern int old_mmap(unsigned long addr, unsigned long len,
27 unsigned long prot, unsigned long flags,
28 unsigned long fd, unsigned long offset);
30 int old_mmap_i386(struct mmap_arg_struct *arg)
32 struct mmap_arg_struct a;
35 if (copy_from_user(&a, arg, sizeof(a)))
38 err = old_mmap(a.addr, a.len, a.prot, a.flags, a.fd, a.offset);
43 struct sel_arg_struct {
45 fd_set *inp, *outp, *exp;
49 int old_select(struct sel_arg_struct *arg)
51 struct sel_arg_struct a;
53 if (copy_from_user(&a, arg, sizeof(a)))
55 /* sys_select() does the appropriate kernel locking */
56 return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
60 * Overrides for Emacs so that we follow Linus's tabbing style.
61 * Emacs will notice this stuff at the end of the file and automatically
62 * adjust the settings for this buffer only. This must remain at the end
64 * ---------------------------------------------------------------------------
66 * c-file-style: "linux"