patch-2.3.9 linux/arch/mips/kernel/syscall.c
Next file: linux/arch/mips/kernel/syscalls.h
Previous file: linux/arch/mips/kernel/softfp.S
Back to the patch index
Back to the overall index
- Lines: 79
- Date:
Fri Jun 25 17:40:12 1999
- Orig file:
v2.3.8/linux/arch/mips/kernel/syscall.c
- Orig date:
Tue Oct 20 13:52:54 1998
diff -u --recursive --new-file v2.3.8/linux/arch/mips/kernel/syscall.c linux/arch/mips/kernel/syscall.c
@@ -1,10 +1,10 @@
-/* $Id: syscall.c,v 1.10 1998/08/20 14:38:40 ralf Exp $
+/* $Id: syscall.c,v 1.10 1999/02/15 02:16:52 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1995 - 1998 by Ralf Baechle
+ * Copyright (C) 1995 - 1999 by Ralf Baechle
*
* TODO: Implement the compatibility syscalls.
* Don't waste that much memory for empty entries in the syscall
@@ -61,6 +61,7 @@
struct file * file = NULL;
unsigned long error = -EFAULT;
+ down(¤t->mm->mmap_sem);
lock_kernel();
if (!(flags & MAP_ANONYMOUS)) {
error = -EBADF;
@@ -74,17 +75,17 @@
fput(file);
out:
unlock_kernel();
+ up(¤t->mm->mmap_sem);
return error;
}
asmlinkage int sys_idle(void)
{
unsigned long start_idle = 0;
- int ret = -EPERM;
- lock_kernel();
if (current->pid != 0)
- goto out;
+ return -EPERM;
+
/* endless idle loop with no priority at all */
current->priority = 0;
current->counter = 0;
@@ -110,10 +111,8 @@
start_idle = 0;
schedule();
}
- ret = 0;
-out:
- unlock_kernel();
- return ret;
+
+ return 0;
}
asmlinkage int sys_fork(struct pt_regs regs)
@@ -121,9 +120,7 @@
int res;
save_static(®s);
- lock_kernel();
res = do_fork(SIGCHLD, regs.regs[29], ®s);
- unlock_kernel();
return res;
}
@@ -134,13 +131,11 @@
int res;
save_static(®s);
- lock_kernel();
clone_flags = regs.regs[4];
newsp = regs.regs[5];
if (!newsp)
newsp = regs.regs[29];
res = do_fork(clone_flags, newsp, ®s);
- unlock_kernel();
return res;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)