Deleted Added
full compact
vm_mmap.c (134615) vm_mmap.c (135727)
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

--- 27 unchanged lines hidden (view full) ---

36 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
37 */
38
39/*
40 * Mapped file (mmap) interface to VM
41 */
42
43#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1988 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

--- 27 unchanged lines hidden (view full) ---

36 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
37 */
38
39/*
40 * Mapped file (mmap) interface to VM
41 */
42
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/sys/vm/vm_mmap.c 134615 2004-09-01 19:58:37Z alc $");
44__FBSDID("$FreeBSD: head/sys/vm/vm_mmap.c 135727 2004-09-24 08:32:36Z phk $");
45
46#include "opt_compat.h"
47#include "opt_mac.h"
48
49#include <sys/param.h>
50#include <sys/systm.h>
51#include <sys/kernel.h>
52#include <sys/lock.h>

--- 1036 unchanged lines hidden (view full) ---

1089 vget(vp, LK_EXCLUSIVE, td);
1090 }
1091 type = OBJT_VNODE;
1092 handle = vp;
1093 } else if (vp->v_type == VCHR) {
1094 type = OBJT_DEVICE;
1095 handle = vp->v_rdev;
1096
45
46#include "opt_compat.h"
47#include "opt_mac.h"
48
49#include <sys/param.h>
50#include <sys/systm.h>
51#include <sys/kernel.h>
52#include <sys/lock.h>

--- 1036 unchanged lines hidden (view full) ---

1089 vget(vp, LK_EXCLUSIVE, td);
1090 }
1091 type = OBJT_VNODE;
1092 handle = vp;
1093 } else if (vp->v_type == VCHR) {
1094 type = OBJT_DEVICE;
1095 handle = vp->v_rdev;
1096
1097 /* XXX: lack thredref on device */
1097 if(vp->v_rdev->si_devsw->d_flags & D_MMAP_ANON) {
1098 *maxprotp = VM_PROT_ALL;
1099 *flagsp |= MAP_ANON;
1100 error = 0;
1101 goto done;
1102 }
1103 /*
1104 * cdevs does not provide private mappings of any kind.

--- 196 unchanged lines hidden ---
1098 if(vp->v_rdev->si_devsw->d_flags & D_MMAP_ANON) {
1099 *maxprotp = VM_PROT_ALL;
1100 *flagsp |= MAP_ANON;
1101 error = 0;
1102 goto done;
1103 }
1104 /*
1105 * cdevs does not provide private mappings of any kind.

--- 196 unchanged lines hidden ---