|
|
| version 1.20, 2004/03/01 06:33:17 | version 1.21, 2004/03/12 23:09:36 |
|---|---|
| Line 596 exec_new_vmspace(struct image_params *im | Line 596 exec_new_vmspace(struct image_params *im |
| * otherwise, create a new VM space so that other threads are | * otherwise, create a new VM space so that other threads are |
| * not disrupted. If we are execing a resident vmspace we | * not disrupted. If we are execing a resident vmspace we |
| * create a duplicate of it and remap the stack. | * create a duplicate of it and remap the stack. |
| * | |
| * The exitingcnt test is not strictly necessary but has been | |
| * included for code sanity (to make the code more deterministic). | |
| */ | */ |
| map = &vmspace->vm_map; | map = &vmspace->vm_map; |
| if (vmcopy) { | if (vmcopy) { |
| Line 603 exec_new_vmspace(struct image_params *im | Line 606 exec_new_vmspace(struct image_params *im |
| vmspace = imgp->proc->p_vmspace; | vmspace = imgp->proc->p_vmspace; |
| pmap_remove_pages(vmspace_pmap(vmspace), stack_addr, USRSTACK); | pmap_remove_pages(vmspace_pmap(vmspace), stack_addr, USRSTACK); |
| map = &vmspace->vm_map; | map = &vmspace->vm_map; |
| } else if (vmspace->vm_refcnt == 1) { | } else if (vmspace->vm_refcnt == 1 && vmspace->vm_exitingcnt == 0) { |
| shmexit(vmspace); | shmexit(vmspace); |
| if (vmspace->vm_upcalls) | |
| upc_release(vmspace, imgp->proc); | |
| pmap_remove_pages(vmspace_pmap(vmspace), 0, VM_MAXUSER_ADDRESS); | pmap_remove_pages(vmspace_pmap(vmspace), 0, VM_MAXUSER_ADDRESS); |
| vm_map_remove(map, 0, VM_MAXUSER_ADDRESS); | vm_map_remove(map, 0, VM_MAXUSER_ADDRESS); |
| } else { | } else { |