diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2003-08-09 16:43:34 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2003-08-09 16:43:34 +0000 |
commit | 840a9bdb8d480d280ce739a43acd154976cfd907 (patch) | |
tree | 70b301eb742b51403acb325b33d437ef427a53af | |
parent | dfe7c12cf5802bb0ba99e5d68b67d1c840cee1c8 (diff) |
2003-06-16 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
* mgt.c (S_proc_dostop): Instead of suspending all threads except
CONTTHREAD, first suspend all threads, and then resume CONTTHREAD.
-rw-r--r-- | proc/ChangeLog | 5 | ||||
-rw-r--r-- | proc/mgt.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/proc/ChangeLog b/proc/ChangeLog index ae03a4e4..372dabbf 100644 --- a/proc/ChangeLog +++ b/proc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-16 Ognyan Kulev <ogi@fmi.uni-sofia.bg> + + * mgt.c (S_proc_dostop): Instead of suspending all threads except + CONTTHREAD, first suspend all threads, and then resume CONTTHREAD. + 2002-06-05 Roland McGrath <roland@frob.com> * info.c (S_proc_getprocinfo): If PI_FETCH_TASKEVENTS is set in *FLAGS, @@ -1,5 +1,5 @@ /* Process management - Copyright (C) 1992,93,94,95,96,99,2000,01,02 Free Software Foundation, Inc. + Copyright (C) 1992,93,94,95,96,99,2000,01,02,03 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -348,14 +348,17 @@ S_proc_dostop (struct proc *p, task_resume (p->p_task); return err; } + /* We can not compare the thread ports with CONTTHREAD, as CONTTHREAD + might be a proxy port (for example in rpctrace). For this reason + we suspend all threads and then resume CONTTHREAD. */ for (i = 0; i < nthreads; i++) { - if (threads[i] != contthread) - thread_suspend (threads[i]); + thread_suspend (threads[i]); mach_port_deallocate (mach_task_self (), threads[i]); } if (threads != threadbuf) munmap (threads, nthreads * sizeof (thread_t)); + thread_resume (contthread); err = task_resume (p->p_task); if (err) return err; |