kern_exit.c (103410) | kern_exit.c (103767) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 |
39 * $FreeBSD: head/sys/kern/kern_exit.c 103410 2002-09-16 19:26:48Z mini $ | 39 * $FreeBSD: head/sys/kern/kern_exit.c 103767 2002-09-21 22:07:17Z jake $ |
40 */ 41 42#include "opt_compat.h" 43#include "opt_ktrace.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> 47#include <sys/sysproto.h> --- 234 unchanged lines hidden (view full) --- 282 * which could cause I/O if the file has been unlinked. 283 * Need to do this early enough that we can still sleep. 284 * Can't free the entire vmspace as the kernel stack 285 * may be mapped within that space also. 286 */ 287 if (--vm->vm_refcnt == 0) { 288 if (vm->vm_shm) 289 shmexit(p); | 40 */ 41 42#include "opt_compat.h" 43#include "opt_ktrace.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> 47#include <sys/sysproto.h> --- 234 unchanged lines hidden (view full) --- 282 * which could cause I/O if the file has been unlinked. 283 * Need to do this early enough that we can still sleep. 284 * Can't free the entire vmspace as the kernel stack 285 * may be mapped within that space also. 286 */ 287 if (--vm->vm_refcnt == 0) { 288 if (vm->vm_shm) 289 shmexit(p); |
290 pmap_remove_pages(vmspace_pmap(vm), VM_MIN_ADDRESS, 291 VM_MAXUSER_ADDRESS); 292 (void) vm_map_remove(&vm->vm_map, VM_MIN_ADDRESS, 293 VM_MAXUSER_ADDRESS); | 290 pmap_remove_pages(vmspace_pmap(vm), vm_map_min(&vm->vm_map), 291 vm_map_max(&vm->vm_map)); 292 (void) vm_map_remove(&vm->vm_map, vm_map_min(&vm->vm_map), 293 vm_map_max(&vm->vm_map)); |
294 vm->vm_freer = p; 295 } 296 297 sx_xlock(&proctree_lock); 298 if (SESS_LEADER(p)) { 299 register struct session *sp; 300 301 sp = p->p_session; --- 582 unchanged lines hidden --- | 294 vm->vm_freer = p; 295 } 296 297 sx_xlock(&proctree_lock); 298 if (SESS_LEADER(p)) { 299 register struct session *sp; 300 301 sp = p->p_session; --- 582 unchanged lines hidden --- |