vm_object.c (c0877f103f9d099383148f07d07e9983194ea699) vm_object.c (cf2819ccb89e0dbc1ce096b99436dbe871cf6f0f)
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
1/*
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * The Mach Operating System project at Carnegie-Mellon University.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

56 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
57 * School of Computer Science
58 * Carnegie Mellon University
59 * Pittsburgh PA 15213-3890
60 *
61 * any improvements or extensions that they make and grant Carnegie the
62 * rights to redistribute these changes.
63 *
64 * $Id: vm_object.c,v 1.119 1998/03/16 01:55:52 dyson Exp $
64 * $Id: vm_object.c,v 1.120 1998/04/29 04:28:09 dyson Exp $
65 */
66
67/*
68 * Virtual memory object module.
69 */
70
71#include <sys/param.h>
72#include <sys/systm.h>
73#include <sys/proc.h> /* for curproc, pageproc */
74#include <sys/vnode.h>
75#include <sys/vmmeter.h>
76#include <sys/mman.h>
65 */
66
67/*
68 * Virtual memory object module.
69 */
70
71#include <sys/param.h>
72#include <sys/systm.h>
73#include <sys/proc.h> /* for curproc, pageproc */
74#include <sys/vnode.h>
75#include <sys/vmmeter.h>
76#include <sys/mman.h>
77#include <sys/mount.h>
77
78#include <vm/vm.h>
79#include <vm/vm_param.h>
80#include <vm/vm_prot.h>
81#include <sys/lock.h>
82#include <vm/pmap.h>
83#include <vm/vm_map.h>
84#include <vm/vm_object.h>

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

646 p->flags &= ~PG_CLEANCHK;
647 ma[maxb] = p;
648 for(i=0;i<maxf;i++) {
649 int index = (maxb + i) + 1;
650 ma[index] = maf[i];
651 ma[index]->flags &= ~PG_CLEANCHK;
652 }
653 runlen = maxb + maxf + 1;
78
79#include <vm/vm.h>
80#include <vm/vm_param.h>
81#include <vm/vm_prot.h>
82#include <sys/lock.h>
83#include <vm/pmap.h>
84#include <vm/vm_map.h>
85#include <vm/vm_object.h>

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

647 p->flags &= ~PG_CLEANCHK;
648 ma[maxb] = p;
649 for(i=0;i<maxf;i++) {
650 int index = (maxb + i) + 1;
651 ma[index] = maf[i];
652 ma[index]->flags &= ~PG_CLEANCHK;
653 }
654 runlen = maxb + maxf + 1;
655
654 splx(s);
655 vm_pageout_flush(ma, runlen, pagerflags);
656 splx(s);
657 vm_pageout_flush(ma, runlen, pagerflags);
658 for (i = 0; i<runlen; i++) {
659 if (ma[i]->valid & ma[i]->dirty) {
660 vm_page_protect(ma[i], VM_PROT_READ);
661 ma[i]->flags |= PG_CLEANCHK;
662 }
663 }
656 if (object->generation != curgeneration)
657 goto rescan;
658 }
659
664 if (object->generation != curgeneration)
665 goto rescan;
666 }
667
660 VOP_FSYNC(vp, NULL, (pagerflags & VM_PAGER_PUT_SYNC)?1:0, curproc);
668 VOP_FSYNC(vp, NULL, (pagerflags & VM_PAGER_PUT_SYNC)?MNT_WAIT:0, curproc);
661
662 object->flags &= ~OBJ_CLEANING;
663 return;
664}
665
666#ifdef not_used
667/* XXX I cannot tell if this should be an exported symbol */
668/*

--- 1059 unchanged lines hidden ---
669
670 object->flags &= ~OBJ_CLEANING;
671 return;
672}
673
674#ifdef not_used
675/* XXX I cannot tell if this should be an exported symbol */
676/*

--- 1059 unchanged lines hidden ---