patch-2.2.11 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

diff -u --recursive --new-file v2.2.10/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
@@ -80,11 +80,10 @@
 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 +109,8 @@
 			start_idle = 0;
 		schedule();
 	}
-	ret = 0;
-out:
-	unlock_kernel();
-	return ret;
+
+	return 0;
 }
 
 asmlinkage int sys_fork(struct pt_regs regs)
@@ -121,9 +118,7 @@
 	int res;
 
 	save_static(&regs);
-	lock_kernel();
 	res = do_fork(SIGCHLD, regs.regs[29], &regs);
-	unlock_kernel();
 	return res;
 }
 
@@ -134,13 +129,11 @@
 	int res;
 
 	save_static(&regs);
-	lock_kernel();
 	clone_flags = regs.regs[4];
 	newsp = regs.regs[5];
 	if (!newsp)
 		newsp = regs.regs[29];
 	res = do_fork(clone_flags, newsp, &regs);
-	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)