Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.20-pre1-ac1 /kernel/ptrace.c

Filename:/kernel/ptrace.c
Lines Added:1
Lines Deleted:14
Also changed in: (Previous) 2.4.19-ac4  2.4.19-ac3  2.4.19-ac2  2.4.19-ac1  2.4.19  2.4.19-rc5-ac1 
(Following) 2.4.20-pre1-ac2  2.4.20-pre1-ac3  2.4.20-pre2-ac1  2.4.20-pre2-ac2  2.4.20-pre2-ac3  2.4.20-pre2-ac4 

Location
[  2.4.20-pre1-ac1
  [  kernel
     o  ptrace.c

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.20pre1/kernel/ptrace.c linux.20pre1-ac1/kernel/ptrace.c
--- linux.20pre1/kernel/ptrace.c   2002-08-06 15:40:34.000000000 +0100
+++ linux.20pre1-ac1/kernel/ptrace.c   2002-08-06 15:41:51.000000000 +0100
@@ -31,20 +31,7 @@
       if (child->state != TASK_STOPPED)
          return -ESRCH;
 #ifdef CONFIG_SMP
-      /* Make sure the child gets off its CPU.. */
-      for (;;) {
-         task_lock(child);
-         if (!task_has_cpu(child))
-            break;
-         task_unlock(child);
-         do {
-            if (child->state != TASK_STOPPED)
-               return -ESRCH;
-            barrier();
-            cpu_relax();
-         } while (task_has_cpu(child));
-      }
-      task_unlock(child);
+      wait_task_inactive(child);
 #endif      
    }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.