vm_mmap.c (1e62bc6357def912448a5e2d0c7bbd3ccfa2bcc8) vm_mmap.c (6c534ad868b816e1b2ba8994e4a03d1e5e8ff3af)
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.

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

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 * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
39 *
40 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
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.

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

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 * from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
39 *
40 * @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
41 * $Id: vm_mmap.c,v 1.19 1995/03/25 16:55:46 davidg Exp $
41 * $Id: vm_mmap.c,v 1.20 1995/03/25 17:36:00 davidg Exp $
42 */
43
44/*
45 * Mapped file (mmap) interface to VM
46 */
47
48#include <sys/param.h>
49#include <sys/systm.h>

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

356 if (mmapdebug & MDB_SYNC)
357 printf("msync: cleaning/flushing address range [%x-%x)\n",
358 addr, addr + size);
359#endif
360
361 /*
362 * Clean the pages and interpret the return value.
363 */
42 */
43
44/*
45 * Mapped file (mmap) interface to VM
46 */
47
48#include <sys/param.h>
49#include <sys/systm.h>

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

356 if (mmapdebug & MDB_SYNC)
357 printf("msync: cleaning/flushing address range [%x-%x)\n",
358 addr, addr + size);
359#endif
360
361 /*
362 * Clean the pages and interpret the return value.
363 */
364 rv = vm_map_clean(map, addr, addr + size, (flags & MS_ASYNC) != 0,
364 rv = vm_map_clean(map, addr, addr + size, (flags & MS_ASYNC) == 0,
365 (flags & MS_INVALIDATE) != 0);
366
367 switch (rv) {
368 case KERN_SUCCESS:
369 break;
370 case KERN_INVALID_ADDRESS:
371 return (EINVAL); /* Sun returns ENOMEM? */
372 case KERN_FAILURE:

--- 451 unchanged lines hidden ---
365 (flags & MS_INVALIDATE) != 0);
366
367 switch (rv) {
368 case KERN_SUCCESS:
369 break;
370 case KERN_INVALID_ADDRESS:
371 return (EINVAL); /* Sun returns ENOMEM? */
372 case KERN_FAILURE:

--- 451 unchanged lines hidden ---