1 |
/* Process management |
/* Process management |
2 |
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. |
3 |
|
|
4 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
5 |
|
|
348 |
task_resume (p->p_task); |
task_resume (p->p_task); |
349 |
return err; |
return err; |
350 |
} |
} |
351 |
|
/* We can not compare the thread ports with CONTTHREAD, as CONTTHREAD |
352 |
|
might be a proxy port (for example in rpctrace). For this reason |
353 |
|
we suspend all threads and then resume CONTTHREAD. */ |
354 |
for (i = 0; i < nthreads; i++) |
for (i = 0; i < nthreads; i++) |
355 |
{ |
{ |
356 |
if (threads[i] != contthread) |
thread_suspend (threads[i]); |
|
thread_suspend (threads[i]); |
|
357 |
mach_port_deallocate (mach_task_self (), threads[i]); |
mach_port_deallocate (mach_task_self (), threads[i]); |
358 |
} |
} |
359 |
if (threads != threadbuf) |
if (threads != threadbuf) |
360 |
munmap (threads, nthreads * sizeof (thread_t)); |
munmap (threads, nthreads * sizeof (thread_t)); |
361 |
|
thread_resume (contthread); |
362 |
err = task_resume (p->p_task); |
err = task_resume (p->p_task); |
363 |
if (err) |
if (err) |
364 |
return err; |
return err; |