patch-2.1.37 linux/arch/mips/kernel/ptrace.c

Next file: linux/arch/mips/kernel/syscalls.h
Previous file: linux/arch/mips/kernel/process.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/arch/mips/kernel/ptrace.c linux/arch/mips/kernel/ptrace.c
@@ -33,18 +33,6 @@
  */
 #define MAGICNUMBER 68
 
-/* change a pid into a task struct. */
-static inline struct task_struct * get_task(int pid)
-{
-	int i;
-
-	for (i = 1; i < NR_TASKS; i++) {
-		if (task[i] != NULL && (task[i]->pid == pid))
-			return task[i];
-	}
-	return NULL;
-}
-
 /*
  * this routine will get a word off of the processes privileged stack. 
  * the offset is how far from the base addr as stored in the TSS.  
@@ -295,7 +283,7 @@
 	}
 	if (pid == 1)		/* you may not mess with init */
 		return -EPERM;
-	if (!(child = get_task(pid)))
+	if (!(child = find_task_by_pid(pid)))
 		return -ESRCH;
 	if (request == PTRACE_ATTACH) {
 		if (child == current)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov