diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-04-06 19:28:33 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-04-06 19:28:33 +0000 |
commit | bf761682a04c0c87932b8f5f60e7ee9859acf7b6 (patch) | |
tree | 77b28d026fba3b67306bb0a3e408dbf0b77730b4 | |
parent | 1a58e6028fa8f16610739409d4fc5bba52c29486 (diff) |
Formerly mgt.c.~3~
-rw-r--r-- | proc/mgt.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -606,15 +606,20 @@ add_tasks (task_t task) processor_set_tasks (psetpriv, &tasks, &ntasks); for (j = 0; j < ntasks; j++) { + int set = 0; if (!foundp) { struct proc *p = task_find_nocreate (tasks[j]); if (!p) - p = new_proc (tasks[j]); + { + p = new_proc (tasks[j]); + set = 1; + } if (!foundp && tasks[j] == task) foundp = p; } - mach_port_deallocate (mach_task_self (), tasks[j]); + if (!set) + mach_port_deallocate (mach_task_self (), tasks[j]); } vm_deallocate (mach_task_self (), (vm_address_t) tasks, ntasks * sizeof (task_t)); |